diff options
author | Eduardo Pedroni <e.pedroni91@gmail.com> | 2014-11-23 16:06:59 +0000 |
---|---|---|
committer | Eduardo Pedroni <e.pedroni91@gmail.com> | 2014-11-23 16:06:59 +0000 |
commit | 98e02b48ea5b83fa6c3247869b841b0afd260a89 (patch) | |
tree | 1dd0270f7639fb53a8dce42eda6b22112283b542 /src/jcgp/backend | |
parent | 80ed9dc59ece5913f7403dd669f74074080a3867 (diff) |
Commented some new files, optimised some methods, moved as much setting up as possible into the GUIGene constructors - ChromosomePane is slightly tidier now.
Diffstat (limited to 'src/jcgp/backend')
-rw-r--r-- | src/jcgp/backend/population/Gene.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/jcgp/backend/population/Gene.java b/src/jcgp/backend/population/Gene.java index 47c8dfd..a22abc6 100644 --- a/src/jcgp/backend/population/Gene.java +++ b/src/jcgp/backend/population/Gene.java @@ -1,7 +1,12 @@ package jcgp.backend.population; /** - * TODO comment + * This abstract class defines a generic CGP gene. + * Three types of gene exist, primarily: {@code Input}, {@code Node} and {@code Output}. + * <br><br> + * In practice, this class facilitates support for a graphical user interface. An arbitrary + * object can be associate with each gene using {@code setGUIObject(...)} and retrieved using + * {@code getGUIObject()}. * * @author Eduardo Pedroni * @@ -10,10 +15,18 @@ public abstract class Gene { private Object guiObject; + /** + * Sets a new GUI object. + * + * @param guiObject the object to set. + */ public void setGUIObject(Object guiObject) { this.guiObject = guiObject; } + /** + * @return the current GUI object associated with this instance. + */ public Object getGUIObject() { return guiObject; } |