aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/backend/parameters
diff options
context:
space:
mode:
Diffstat (limited to 'src/jcgp/backend/parameters')
-rw-r--r--src/jcgp/backend/parameters/BooleanParameter.java9
-rw-r--r--src/jcgp/backend/parameters/DoubleParameter.java2
-rw-r--r--src/jcgp/backend/parameters/IntegerParameter.java2
-rw-r--r--src/jcgp/backend/parameters/Parameter.java8
-rw-r--r--src/jcgp/backend/parameters/ParameterStatus.java2
5 files changed, 17 insertions, 6 deletions
diff --git a/src/jcgp/backend/parameters/BooleanParameter.java b/src/jcgp/backend/parameters/BooleanParameter.java
index db78419..43825be 100644
--- a/src/jcgp/backend/parameters/BooleanParameter.java
+++ b/src/jcgp/backend/parameters/BooleanParameter.java
@@ -11,6 +11,13 @@ public abstract class BooleanParameter extends Parameter {
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);
@@ -26,7 +33,7 @@ public abstract class BooleanParameter extends Parameter {
}
}
- protected abstract void validate(boolean 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
index 2b98991..53551f5 100644
--- a/src/jcgp/backend/parameters/DoubleParameter.java
+++ b/src/jcgp/backend/parameters/DoubleParameter.java
@@ -30,6 +30,6 @@ public abstract class DoubleParameter extends Parameter {
return value;
}
- protected abstract void validate(double newValue);
+ public abstract void validate(double newValue);
}
diff --git a/src/jcgp/backend/parameters/IntegerParameter.java b/src/jcgp/backend/parameters/IntegerParameter.java
index 1127817..68095d9 100644
--- a/src/jcgp/backend/parameters/IntegerParameter.java
+++ b/src/jcgp/backend/parameters/IntegerParameter.java
@@ -31,6 +31,6 @@ public abstract class IntegerParameter extends Parameter {
return value;
}
- protected abstract void validate(int newValue);
+ public abstract void validate(int newValue);
}
diff --git a/src/jcgp/backend/parameters/Parameter.java b/src/jcgp/backend/parameters/Parameter.java
index 26bc8f1..ddd5d5b 100644
--- a/src/jcgp/backend/parameters/Parameter.java
+++ b/src/jcgp/backend/parameters/Parameter.java
@@ -4,7 +4,7 @@ import javafx.beans.property.Property;
public abstract class Parameter {
- protected boolean monitor, critical;
+ protected boolean monitor, critical, reset = false;
protected ParameterStatus status = ParameterStatus.VALID;
@@ -24,6 +24,10 @@ public abstract class Parameter {
return critical;
}
+ public boolean requiresReset() {
+ return critical || reset;
+ }
+
public String getName() {
return name;
}
@@ -33,5 +37,5 @@ public abstract class Parameter {
}
public abstract Property<?> valueProperty();
-
+
}
diff --git a/src/jcgp/backend/parameters/ParameterStatus.java b/src/jcgp/backend/parameters/ParameterStatus.java
index ed235d4..86abe33 100644
--- a/src/jcgp/backend/parameters/ParameterStatus.java
+++ b/src/jcgp/backend/parameters/ParameterStatus.java
@@ -1,7 +1,7 @@
package jcgp.backend.parameters;
public enum ParameterStatus {
- INVALID, WARNING, VALID;
+ INVALID, WARNING, WARNING_RESET, VALID;
private String details;