public interface NumericGene<N extends Number & Comparable<? super N>,G extends NumericGene<N,G>> extends BoundedGene<N,G>, Comparable<G>
Modifier and Type | Method and Description |
---|---|
default byte |
byteValue()
Returns the value of the specified gene as an byte.
|
default double |
doubleValue()
Returns the value of the specified gene as an double.
|
default float |
floatValue()
Returns the value of the specified gene as an float.
|
default int |
intValue()
Returns the value of the specified gene as an int.
|
default long |
longValue()
Returns the value of the specified gene as an long.
|
G |
newInstance(Number number)
Create a new gene from the given
value and the current bounds. |
default short |
shortValue()
Returns the value of the specified gene as an short.
|
compareTo, getMax, getMin, isValid
getAllele, newInstance
default byte byteValue()
byte
.default short shortValue()
short
.default int intValue()
int
.default long longValue()
long
.default float floatValue()
float
.default double doubleValue()
double
.G newInstance(Number number)
BoundedGene
value
and the current bounds.newInstance
in interface BoundedGene<N extends Number & Comparable<? super N>,G extends NumericGene<N,G>>
newInstance
in interface Gene<N extends Number & Comparable<? super N>,G extends NumericGene<N,G>>
number
- the value of the new gene.© 2007-2016 Franz Wilhelmstötter (2016-04-24 10:25)