aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/jcgp/backend')
-rw-r--r--src/jcgp/backend/population/Gene.java15
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;
}