diff options
author | Eduardo Pedroni <ep625@york.ac.uk> | 2014-04-06 21:58:53 +0100 |
---|---|---|
committer | Eduardo Pedroni <ep625@york.ac.uk> | 2014-04-06 21:58:53 +0100 |
commit | e6dd7711c7dad5e000445208eb5845801f4ccffc (patch) | |
tree | 1454bd20a8dd7069b1283184c42f4def6d5f7e6f /src/jcgp/backend/parameters | |
parent | c7969623b44f375e30fa3f15dcd7581609276a0f (diff) |
About to make big changes to the way fitness works, committing just in case
Diffstat (limited to 'src/jcgp/backend/parameters')
-rw-r--r-- | src/jcgp/backend/parameters/BooleanParameter.java | 41 | ||||
-rw-r--r-- | src/jcgp/backend/parameters/DoubleParameter.java | 35 | ||||
-rw-r--r-- | src/jcgp/backend/parameters/IntegerParameter.java | 36 | ||||
-rw-r--r-- | src/jcgp/backend/parameters/Parameter.java | 41 | ||||
-rw-r--r-- | src/jcgp/backend/parameters/ParameterStatus.java | 16 |
5 files changed, 0 insertions, 169 deletions
diff --git a/src/jcgp/backend/parameters/BooleanParameter.java b/src/jcgp/backend/parameters/BooleanParameter.java deleted file mode 100644 index 43825be..0000000 --- a/src/jcgp/backend/parameters/BooleanParameter.java +++ /dev/null @@ -1,41 +0,0 @@ -package jcgp.backend.parameters; - -import javafx.beans.property.SimpleBooleanProperty; - -public abstract class BooleanParameter extends Parameter { - - private SimpleBooleanProperty value; - - public BooleanParameter(boolean value, String name, boolean monitor, boolean critical) { - super(name, monitor, critical); - this.value = new SimpleBooleanProperty(value); - } - - /** - * Simple BooleanParameter constructor, - * - * - * @param value - * @param name - */ - public BooleanParameter(boolean value, String name) { - super(name, false, false); - this.value = new SimpleBooleanProperty(value); - } - - public boolean get() { - return value.get(); - } - - public void set(boolean newValue) { - if (!value.isBound()) { - value.set(newValue); - } - } - - public abstract void validate(boolean newValue); - - public SimpleBooleanProperty valueProperty() { - return value; - } -} diff --git a/src/jcgp/backend/parameters/DoubleParameter.java b/src/jcgp/backend/parameters/DoubleParameter.java deleted file mode 100644 index 53551f5..0000000 --- a/src/jcgp/backend/parameters/DoubleParameter.java +++ /dev/null @@ -1,35 +0,0 @@ -package jcgp.backend.parameters; - -import javafx.beans.property.SimpleDoubleProperty; - -public abstract class DoubleParameter extends Parameter { - - protected SimpleDoubleProperty value; - - public DoubleParameter(double value, String name, boolean monitor, boolean critical) { - super(name, monitor, critical); - this.value = new SimpleDoubleProperty(value); - } - - public DoubleParameter(double value, String name) { - super(name, false, false); - this.value = new SimpleDoubleProperty(value); - } - - public double get() { - return value.get(); - } - - public void set(double newValue) { - if (!value.isBound()) { - value.set(newValue); - } - } - - public SimpleDoubleProperty valueProperty() { - return value; - } - - public abstract void validate(double newValue); - -} diff --git a/src/jcgp/backend/parameters/IntegerParameter.java b/src/jcgp/backend/parameters/IntegerParameter.java deleted file mode 100644 index 68095d9..0000000 --- a/src/jcgp/backend/parameters/IntegerParameter.java +++ /dev/null @@ -1,36 +0,0 @@ -package jcgp.backend.parameters; - -import javafx.beans.property.SimpleIntegerProperty; - -public abstract class IntegerParameter extends Parameter { - - private SimpleIntegerProperty value; - - public IntegerParameter(int value, String name, boolean monitor, boolean critical) { - super(name, monitor, critical); - this.value = new SimpleIntegerProperty(value); - } - - public IntegerParameter(int value, String name) { - super(name, false, false); - this.value = new SimpleIntegerProperty(value); - } - - public int get() { - return value.get(); - } - - public void set(int newValue) { - if (!value.isBound()) { - validate(newValue); - value.set(newValue); - } - } - - public SimpleIntegerProperty valueProperty() { - return value; - } - - public abstract void validate(int newValue); - -} diff --git a/src/jcgp/backend/parameters/Parameter.java b/src/jcgp/backend/parameters/Parameter.java deleted file mode 100644 index ddd5d5b..0000000 --- a/src/jcgp/backend/parameters/Parameter.java +++ /dev/null @@ -1,41 +0,0 @@ -package jcgp.backend.parameters; - -import javafx.beans.property.Property; - -public abstract class Parameter { - - protected boolean monitor, critical, reset = false; - - protected ParameterStatus status = ParameterStatus.VALID; - - protected String name; - - public Parameter(String name, boolean monitor, boolean critical) { - this.name = name; - this.monitor = monitor; - this.critical = critical; - } - - public boolean isMonitor() { - return monitor; - } - - public boolean isCritical() { - return critical; - } - - public boolean requiresReset() { - return critical || reset; - } - - public String getName() { - return name; - } - - public ParameterStatus getStatus() { - return status; - } - - public abstract Property<?> valueProperty(); - -} diff --git a/src/jcgp/backend/parameters/ParameterStatus.java b/src/jcgp/backend/parameters/ParameterStatus.java deleted file mode 100644 index 86abe33..0000000 --- a/src/jcgp/backend/parameters/ParameterStatus.java +++ /dev/null @@ -1,16 +0,0 @@ -package jcgp.backend.parameters; - -public enum ParameterStatus { - INVALID, WARNING, WARNING_RESET, VALID; - - private String details; - - public void setDetails(String details) { - this.details = details; - } - - public String getDetails() { - return details; - } - -} |