jenes.chromosome
Enum BitwiseChromosome.BitSize

java.lang.Object
  extended by java.lang.Enum<BitwiseChromosome.BitSize>
      extended by jenes.chromosome.BitwiseChromosome.BitSize
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<BitwiseChromosome.BitSize>
Enclosing class:
BitwiseChromosome

public static enum BitwiseChromosome.BitSize
extends java.lang.Enum<BitwiseChromosome.BitSize>

Definition of the number bit length and mask to use in the coding operations.

Since:
1.0
Version:
1.2
Author:
Luigi Troiano, Pierpaolo Lombardi, Giuseppe Pascale, Thierry Bodhuin

Enum Constant Summary
BIT1
          Standard 1 bit strucure
BIT16
          Standard 16 bits strucure
BIT32
          Standard 32 bits strucure
BIT8
          Standard 8 bits strucure
 
Field Summary
 int BITS
          The number of bits
 int MASK
          The bit mask for retrieving and setting
 
Method Summary
static BitwiseChromosome.BitSize valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static BitwiseChromosome.BitSize[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BIT1

public static final BitwiseChromosome.BitSize BIT1
Standard 1 bit strucure


BIT8

public static final BitwiseChromosome.BitSize BIT8
Standard 8 bits strucure


BIT16

public static final BitwiseChromosome.BitSize BIT16
Standard 16 bits strucure


BIT32

public static final BitwiseChromosome.BitSize BIT32
Standard 32 bits strucure

Field Detail

BITS

public final int BITS
The number of bits


MASK

public final int MASK
The bit mask for retrieving and setting

Method Detail

values

public static BitwiseChromosome.BitSize[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (BitwiseChromosome.BitSize c : BitwiseChromosome.BitSize.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static BitwiseChromosome.BitSize valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null