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 classReaders.BitChromosomeBit chromosome reader methods, which reads XML-representations of bit-chromosomes.static classReaders.BoundedChromosomeReader methods forBoundedChromosomeobjects.static classReaders.CharacterChromosomeReader methods forCharacterChromosomeobjects.static classReaders.DoubleChromosomeReader methods forDoubleChromosomeobjects.static classReaders.GenotypeWriter methods forGenotypeobjects.static classReaders.GenotypesThis class contains static reader methods forGenotypeobjects.static classReaders.IntegerChromosomeReader methods forIntegerChromosomeobjects.static classReaders.LongChromosomeReader methods forLongChromosomeobjects.static classReaders.PermutationChromosomeReader methods forPermutationChromosomeobjects.
-
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)
-
-