Package io.jenetics.xml
Class Readers.IntegerChromosome
- java.lang.Object
-
- io.jenetics.xml.Readers.IntegerChromosome
-
- Enclosing class:
- Readers
public static final class Readers.IntegerChromosome extends Object
Reader methods forIntegerChromosome
objects.XML format
<int-chromosome length="3"> <min>-2147483648</min> <max>2147483647</max> <alleles> <allele>-1878762439</allele> <allele>-957346595</allele> <allele>-88668137</allele> </alleles> </int-chromosome>
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Reader<Integer>
alleleReader()
Return the default allele reader for theIntegerChromosome
.static IntegerChromosome
read(InputStream in)
Read a newIntegerChromosome
from the given input stream.static Reader<IntegerChromosome>
reader()
Return aIntegerChromosome
reader.
-
-
-
Method Detail
-
alleleReader
public static Reader<Integer> alleleReader()
Return the default allele reader for theIntegerChromosome
.- Returns:
- the default allele reader
-
reader
public static Reader<IntegerChromosome> reader()
Return aIntegerChromosome
reader.- Returns:
- a integer chromosome reader
-
read
public static IntegerChromosome read(InputStream in) throws XMLStreamException
Read a newIntegerChromosome
from the given input stream.- Parameters:
in
- the data source of the chromosome- Returns:
- a new chromosome
- Throws:
XMLStreamException
- if reading the chromosome failsNullPointerException
- if the given input stream isnull
-
-