blob: cc60179994ddc7cdeb3dff2d132545fbd4de5ad8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
package jcgp.parameters;
import javafx.beans.property.SimpleIntegerProperty;
public class IntegerParameter extends Parameter {
public IntegerParameter(int value, String name) {
super(name);
this.value = new SimpleIntegerProperty(value);
}
public IntegerParameter(int value, String name, boolean managed, boolean hidden) {
super(name, managed, hidden);
this.value = new SimpleIntegerProperty(value);
}
@Override
public Integer getValue() {
return ((SimpleIntegerProperty) this.value).get();
}
@Override
public SimpleIntegerProperty valueProperty() {
return (SimpleIntegerProperty) value;
}
@Override
public void setValue(Object value) {
((SimpleIntegerProperty) this.value).set((int) value);
}
}
|