diff options
Diffstat (limited to 'src/jcgp/backend')
-rw-r--r-- | src/jcgp/backend/population/Gene.java | 20 | ||||
-rw-r--r-- | src/jcgp/backend/population/Input.java | 2 | ||||
-rw-r--r-- | src/jcgp/backend/population/Node.java | 2 | ||||
-rw-r--r-- | src/jcgp/backend/population/Output.java | 2 |
4 files changed, 23 insertions, 3 deletions
diff --git a/src/jcgp/backend/population/Gene.java b/src/jcgp/backend/population/Gene.java new file mode 100644 index 0000000..47c8dfd --- /dev/null +++ b/src/jcgp/backend/population/Gene.java @@ -0,0 +1,20 @@ +package jcgp.backend.population; + +/** + * TODO comment + * + * @author Eduardo Pedroni + * + */ +public abstract class Gene { + + private Object guiObject; + + public void setGUIObject(Object guiObject) { + this.guiObject = guiObject; + } + + public Object getGUIObject() { + return guiObject; + } +} diff --git a/src/jcgp/backend/population/Input.java b/src/jcgp/backend/population/Input.java index 97fe82b..7d2590b 100644 --- a/src/jcgp/backend/population/Input.java +++ b/src/jcgp/backend/population/Input.java @@ -9,7 +9,7 @@ package jcgp.backend.population; * @author Eduardo Pedroni * */ -public class Input implements Connection { +public class Input extends Gene implements Connection { private Object value; private int index; diff --git a/src/jcgp/backend/population/Node.java b/src/jcgp/backend/population/Node.java index 6696694..a9131d1 100644 --- a/src/jcgp/backend/population/Node.java +++ b/src/jcgp/backend/population/Node.java @@ -25,7 +25,7 @@ import jcgp.backend.resources.Resources; * @author Eduardo Pedroni * */ -public class Node implements Mutable, Connection { +public class Node extends Gene implements Mutable, Connection { private Function function; private Connection[] connections; diff --git a/src/jcgp/backend/population/Output.java b/src/jcgp/backend/population/Output.java index a346d4a..c87f97c 100644 --- a/src/jcgp/backend/population/Output.java +++ b/src/jcgp/backend/population/Output.java @@ -16,7 +16,7 @@ import java.util.ArrayList; * @author Eduardo Pedroni * */ -public class Output implements Mutable { +public class Output extends Gene implements Mutable { private Connection source; private Chromosome chromosome; |