A - the Allele type
of this gene.public interface Gene<A,G extends Gene<A,G>> extends Factory<G>, Verifiable
of. When extending the library
with own Gene implementations, it is recommended to also implement it
as value objects.ChromosomeGenotype and
Phenotype) are not changed after they have been created. Therefore,
all implementations of the Gene interface must also be
immutable.| Modifier and Type | Method and Description |
|---|---|
A |
getAllele()
Return the allele of this gene.
|
G |
newInstance()
Return a new, random gene with the same type and with the same constraints
than this gene.
|
G |
newInstance(A value)
Create a new gene from the given
value and the gene context. |
isValidG newInstance()
gene.getClass() == gene.newInstance().getClass(). Implementations
of this method has to use the Random object which can
be fetched from the RandomRegistry.G newInstance(A value)
value and the gene context.value - the value of the new gene.© 2007-2019 Franz Wilhelmstötter (2019-11-18 20:30)