public final class BigIntegerGene extends Object implements NumericGene<BigInteger,BigIntegerGene>, Mean<BigIntegerGene>, Serializable
This is a
value-based class; use of identity-sensitive operations (including
reference equality (==
), identity hash code, or synchronization) on
instances of IntegerGene
may have unpredictable results and should
be avoided.
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
BigInteger |
getAllele() |
BigInteger |
getMax() |
BigInteger |
getMin() |
int |
hashCode() |
BigIntegerGene |
mean(BigIntegerGene that) |
BigIntegerGene |
newInstance() |
BigIntegerGene |
newInstance(BigInteger value) |
BigIntegerGene |
newInstance(Number number) |
static BigIntegerGene |
of(BigInteger min,
BigInteger max)
Create a new random
BigIntegerGene . |
static BigIntegerGene |
of(BigInteger value,
BigInteger min,
BigInteger max)
Create a new random
BigIntegerGene with the given value and the
given range. |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
byteValue, doubleValue, floatValue, intValue, longValue, shortValue
compareTo, isValid
public BigInteger getAllele()
getAllele
in interface Gene<BigInteger,BigIntegerGene>
public BigInteger getMin()
getMin
in interface BoundedGene<BigInteger,BigIntegerGene>
public BigInteger getMax()
getMax
in interface BoundedGene<BigInteger,BigIntegerGene>
public BigIntegerGene mean(BigIntegerGene that)
mean
in interface Mean<BigIntegerGene>
public BigIntegerGene newInstance(Number number)
newInstance
in interface NumericGene<BigInteger,BigIntegerGene>
public BigIntegerGene newInstance(BigInteger value)
newInstance
in interface BoundedGene<BigInteger,BigIntegerGene>
newInstance
in interface Gene<BigInteger,BigIntegerGene>
public BigIntegerGene newInstance()
newInstance
in interface Gene<BigInteger,BigIntegerGene>
newInstance
in interface Factory<BigIntegerGene>
public static BigIntegerGene of(BigInteger value, BigInteger min, BigInteger max)
BigIntegerGene
with the given value and the
given range. If the value
isn't within the interval [min, max],
no exception is thrown. In this case the method
BoundedGene.isValid()
returns false
.value
- the value of the gene.min
- the minimal valid value of this gene (inclusively).max
- the maximal valid value of this gene (inclusively).BigIntegerGene
NullPointerException
- if one of the arguments is null
public static BigIntegerGene of(BigInteger min, BigInteger max)
BigIntegerGene
. It is guaranteed that the
value of the BigIntegerGene
lies in the interval [min, max].min
- the minimal valid value of this gene (inclusively).max
- the maximal valid value of this gene (inclusively).BigIntegerGene
NullPointerException
- if one of the arguments is null
© 2007-2019 Franz Wilhelmstötter (2019-02-19 21:44)