From 98e02b48ea5b83fa6c3247869b841b0afd260a89 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Sun, 23 Nov 2014 16:06:59 +0000 Subject: Commented some new files, optimised some methods, moved as much setting up as possible into the GUIGene constructors - ChromosomePane is slightly tidier now. --- src/jcgp/backend/population/Gene.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/jcgp/backend') 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}. + *

+ * 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; } -- cgit v1.2.3