- All Implemented Interfaces:
Gene<Boolean,,BitGene> Factory<BitGene>,Self<BitGene>,Verifiable,Serializable,Comparable<BitGene>,Constable
Implementation of a BitGene.
- Since:
- 1.0
- Version:
- 6.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionallele()Return the allele of this gene.final booleanbit()Return the value of the BitGene.booleanReturn thebooleanvalue of this gene.booleanisValid()Return alwaystrue.Create a new, random gene.newInstance(Boolean value) Create a new gene from the givenvalue.static BitGeneof(boolean value) Return the correspondingBitGenefor the givenbooleanvalue.toString()static BitGeneReturns the enum constant of this class with the specified name.static BitGene[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOfMethods inherited from interface java.lang.Comparable
compareTo
-
Enum Constant Details
-
FALSE
-
TRUE
-
-
Field Details
-
ZERO
-
ONE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
bit
Return the value of the BitGene.- Returns:
- The value of the BitGene.
- See Also:
-
booleanValue
Return thebooleanvalue of this gene.- Returns:
- the
booleanvalue of this gene. - See Also:
-
allele
Description copied from interface:GeneReturn the allele of this gene. -
isValid
Return alwaystrue.- Specified by:
isValidin interfaceVerifiable- Returns:
- always
true
-
newInstance
Create a new, random gene.- Specified by:
newInstancein interfaceFactory<BitGene>- Specified by:
newInstancein interfaceGene<Boolean,BitGene> - Returns:
- a new instance of type T
-
newInstance
Create a new gene from the givenvalue.- Specified by:
newInstancein interfaceGene<Boolean,BitGene> - Parameters:
value- the value of the new gene.- Returns:
- a new gene with the given value.
- Since:
- 1.6
-
toString
-
of
Return the correspondingBitGenefor the givenbooleanvalue.- Parameters:
value- the value of the returnedBitGene.- Returns:
- the
BitGenefor the givenbooleanvalue.
-