Package io.jenetics.xml
Class Readers
- java.lang.Object
-
- io.jenetics.xml.Readers
-
public final class Readers extends Object
This class contains static fields and methods, for creating chromosome- and genotype readers for different gene types.final Reader<Genotype<BitGene> bgr = Readers.Genotype.reader(Readers.BitChromosome.reader())); final Reader<Genotype<IntegerGene>> igr = Writers.Genotype.reader(Readers.IntegerChromosome.reader())); final Reader<Genotype<DoubleGene>> dgr = Readers.Genotype.reader(Readers.DoubleChromosome.reader()));
- Since:
- 3.9
- Version:
- 3.9
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Readers.BitChromosome
Bit chromosome reader methods, which reads XML-representations of bit-chromosomes.static class
Readers.BoundedChromosome
Reader methods forBoundedChromosome
objects.static class
Readers.CharacterChromosome
Reader methods forCharacterChromosome
objects.static class
Readers.DoubleChromosome
Reader methods forDoubleChromosome
objects.static class
Readers.Genotype
Writer methods forGenotype
objects.static class
Readers.Genotypes
This class contains static reader methods forGenotype
objects.static class
Readers.IntegerChromosome
Reader methods forIntegerChromosome
objects.static class
Readers.LongChromosome
Reader methods forLongChromosome
objects.static class
Readers.PermutationChromosome
Reader methods forPermutationChromosome
objects.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <A,G extends Gene<A,G>,C extends Chromosome<G>>
List<Genotype<G>>read(InputStream in, Reader<? extends C> chromosomeReader)
Reads the genotypes by using the given chromosome reader.
-
-
-
Method Detail
-
read
public static <A,G extends Gene<A,G>,C extends Chromosome<G>> List<Genotype<G>> read(InputStream in, Reader<? extends C> chromosomeReader) throws XMLStreamException
Reads the genotypes by using the given chromosome reader.- Type Parameters:
A
- the allele typeG
- the gene typeC
- the chromosome type- Parameters:
in
- the input stream to read the genotype fromchromosomeReader
- the used chromosome reader- Returns:
- a genotype by using the given chromosome reader
- Throws:
XMLStreamException
- if reading the genotype failsNullPointerException
- if one of the arguments isnull
- See Also:
Readers.Genotypes.read(InputStream, Reader)
-
-