aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/parameters/DoubleParameter.java
blob: ade99cc36490a4937cff992955726563ae04e8ec (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
33
package jcgp.parameters;

import javafx.beans.property.SimpleDoubleProperty;

public class DoubleParameter extends Parameter {
			
	public DoubleParameter(double value, String name) {
		super(name);
		this.value = new SimpleDoubleProperty(value);
	}
	
	public DoubleParameter(double value, String name, boolean managed, boolean hidden) {
		super(name, managed, hidden);
		this.value = new SimpleDoubleProperty(value);
	}
	
	@Override
	public Double getValue() {
		return ((SimpleDoubleProperty) value).get();
	}
	
	@Override
	public SimpleDoubleProperty valueProperty() {
		return (SimpleDoubleProperty) value;
	}

	@Override
	public void setValue(Object value) {
		((SimpleDoubleProperty) this.value).set((double) value);
		
	}
	
}