public enum BitGene extends Enum<BitGene> implements Gene<Boolean,BitGene>, Comparable<BitGene>, XMLSerializable
Modifier and Type | Field and Description |
---|---|
static Function<BitGene,Boolean> |
Allele
Converter for accessing the allele from a given gene.
|
static BitGene |
ONE |
static BitGene |
ZERO |
Modifier and Type | Method and Description |
---|---|
boolean |
booleanValue()
Return the
boolean value of this gene. |
BitGene |
copy()
Deprecated.
|
Boolean |
getAllele()
Return the allele of this gene.
|
boolean |
getBit()
Return the value of the BitGene.
|
boolean |
isValid()
Return always
true . |
BitGene |
newInstance()
Create a new, random gene.
|
BitGene |
newInstance(Boolean value)
Create a new gene from the given
value .. |
static BitGene |
of(boolean value)
Return the corresponding
BitGene for the given boolean
value. |
String |
toString() |
static BitGene |
valueOf(boolean value)
Deprecated.
Use
of(boolean) instead. |
static BitGene |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BitGene[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
compareTo
public static BitGene[] values()
for (BitGene c : BitGene.values()) System.out.println(c);
public static BitGene valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic final boolean getBit()
public boolean booleanValue()
boolean
value of this gene.boolean
value of this gene.getAllele()
public Boolean getAllele()
Gene
public boolean isValid()
true
.isValid
in interface Verifiable
true
.@Deprecated public BitGene copy()
public BitGene newInstance()
newInstance
in interface Gene<Boolean,BitGene>
newInstance
in interface Factory<BitGene>
public BitGene newInstance(Boolean value)
value
..value
- the value of the new gene.@Deprecated public static BitGene valueOf(boolean value)
of(boolean)
instead.BitGene
for the given boolean
value.value
- the value of the returned BitGene
.BitGene
for the given boolean
value.© 2007-2014 Franz Wilhelmstötter (2014-03-07 19:35)