|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdlife.ga.Gene
public abstract class Gene
An abstract base class extended by all types of Genes. This defines the methods that must appear in any Gene used with the dlife.ga package. It also provides an implementation of the clone method that can be used by any Gene sub-class that contains only primitive and Cloneable fields.
| Constructor Summary | |
|---|---|
Gene()
|
|
| Method Summary | |
|---|---|
Gene |
clone()
Create a clone of this Gene. |
Gene |
copy()
Generate an exact copy of this Gene. |
abstract boolean |
equals(Object obj)
Determine if this Gene is equal to the Gene obj. |
abstract void |
mutate()
Mutate this Gene. |
abstract void |
randomize()
Set the value of this Gene to a random value. |
abstract String |
toString()
Return the value of this Gene as a String. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Gene()
| Method Detail |
|---|
public final Gene copy()
public Gene clone()
clone in class Objectpublic abstract void mutate()
public abstract void randomize()
public abstract String toString()
toString in class Objectpublic abstract boolean equals(Object obj)
equals in class Object
|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||