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() |
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.
|
String |
toString() |
static BitGene |
valueOf(boolean value)
Return the corresponding
BitGene for the given boolean
value. |
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, valueOfcompareTopublic 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()
Genepublic boolean isValid()
true.isValid in interface Verifiabletrue.public BitGene newInstance()
newInstance in interface Gene<Boolean,BitGene>newInstance in interface Factory<BitGene>© 2007-2013 Franz Wilhelmstötter (2013-12-18 20:17)