Package io.jenetics.xml
Class Readers.BitChromosome
- java.lang.Object
-
- io.jenetics.xml.Readers.BitChromosome
-
- Enclosing class:
- Readers
public static final class Readers.BitChromosome extends Object
Bit chromosome reader methods, which reads XML-representations of bit-chromosomes.XML
<bit-chromosome length="20" ones-probability="0.5">11100011101011001010</bit-chromosome>
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BitChromosome
read(InputStream in)
Read a newBitChromosome
from the given input stream.static Reader<BitChromosome>
reader()
Return a XML reader forBitChromosome
objects.
-
-
-
Method Detail
-
reader
public static Reader<BitChromosome> reader()
Return a XML reader forBitChromosome
objects.- Returns:
- a chromosome reader
-
read
public static BitChromosome read(InputStream in) throws XMLStreamException
Read a newBitChromosome
from the given input stream.- Parameters:
in
- the data source of the bit-chromosome- Returns:
- the bit-chromosome read from the input stream
- Throws:
XMLStreamException
- if reading the chromosome failsNullPointerException
- if the given input stream isnull
-
-