aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/backend/resources/parameters/Parameter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jcgp/backend/resources/parameters/Parameter.java')
-rw-r--r--src/jcgp/backend/resources/parameters/Parameter.java57
1 files changed, 0 insertions, 57 deletions
diff --git a/src/jcgp/backend/resources/parameters/Parameter.java b/src/jcgp/backend/resources/parameters/Parameter.java
deleted file mode 100644
index 3990ae6..0000000
--- a/src/jcgp/backend/resources/parameters/Parameter.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package jcgp.backend.resources.parameters;
-
-import javafx.beans.property.Property;
-import javafx.beans.property.ReadOnlyProperty;
-
-public abstract class Parameter<T> {
-
- protected boolean monitor, critical, reset = false;
-
- protected ParameterStatus status = ParameterStatus.VALID;
-
- protected String name;
-
- protected Property<T> valueProperty;
-
- 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 ReadOnlyProperty<T> valueProperty() {
- return valueProperty;
- }
-
- public T get() {
- return valueProperty.getValue();
- }
-
- public void set(T newValue) {
- if (!valueProperty.isBound()) {
- valueProperty.setValue(newValue);
- }
- }
-
- public abstract void validate(T newValue);
-}