public interface BoundedGene<A extends Comparable<? super A>,G extends BoundedGene<A,G>> extends Gene<A,G>, Comparable<G>
BoundedChromosome
Genotype
and
Phenotype
) are not changed after they have been created. Therefore,
all implementations of the BoundedGene
interface must also be
immutable.Modifier and Type | Method and Description |
---|---|
default int |
compareTo(G other) |
A |
getMax()
Return the allowed max value.
|
A |
getMin()
Return the allowed min value.
|
default boolean |
isValid()
Check if this object is valid.
|
G |
newInstance(A value)
Create a new gene from the given
value and the current bounds. |
getAllele, newInstance
default boolean isValid()
Verifiable
isValid
in interface Verifiable
default int compareTo(G other)
compareTo
in interface Comparable<G extends BoundedGene<A,G>>
G newInstance(A value)
value
and the current bounds.newInstance
in interface Gene<A extends Comparable<? super A>,G extends BoundedGene<A,G>>
value
- the value of the new gene.© 2007-2019 Franz Wilhelmstötter (2019-11-18 20:30)