public interface Chromosome<G extends Gene<?,G>> extends Verifiable, Iterable<G>, Factory<Chromosome<G>>, Serializable
 API Note: 
 Implementations of the Chromosome interface must be immutable
 and guarantee an efficient random access (O(1)) to the genes.
| Modifier and Type | Method and Description | 
|---|---|
| default G | getGene()Return the first gene of this chromosome. | 
| G | getGene(int index)Return the gene on the specified index. | 
| int | length()Returns the length of the Chromosome. | 
| Chromosome<G> | newInstance(ISeq<G> genes)A factory method which creates a new  Chromosomeof specific type
 and the givengenes. | 
| ISeq<G> | toSeq()Return an unmodifiable sequence of the genes of this chromosome. | 
isValidforEach, iterator, spliteratorinstances, newInstanceChromosome<G> newInstance(ISeq<G> genes)
Chromosome of specific type
 and the given genes.genes - the genes of the new chromosome. The given genes array is
         not copied.Chromosome of the same type with the given genes.NullPointerException - if the given genes are null.IllegalArgumentException - if the length of the given gene sequence
        is smaller than one.default G getGene()
G getGene(int index)
index - The gene index.IndexOutOfBoundsException - if the index is out of range
          (index < 1 || index >= length()).int length()
© 2007-2014 Franz Wilhelmstötter (2014-12-28 10:45)