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()
Deprecated.
Use
min() ()} instead. Implementer must still
implement this method. |
A |
getMin()
Deprecated.
Use
min() ()} instead. Implementer must still
implement this method. |
default boolean |
isValid()
Check if this object is valid.
|
default A |
max()
Return the allowed max value.
|
default A |
min()
Return the allowed min value.
|
G |
newInstance(A value)
Create a new gene from the given
value and the current bounds. |
allele, getAllele, newInstance
@Deprecated A getMin()
min()
()} instead. Implementer must still
implement this method.@Deprecated A getMax()
min()
()} instead. Implementer must still
implement this method.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-2020 Franz Wilhelmstötter (2020-02-18 20:01)