java.lang.Object
io.jenetics.xml.Readers
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 ClassesModifier and TypeClassDescriptionstatic final classBit chromosome reader methods, which reads XML-representations of bit-chromosomes.static final classReader methods forBoundedChromosomeobjects.static final classReader methods forCharacterChromosomeobjects.static final classReader methods forDoubleChromosomeobjects.static final classWriter methods forGenotypeobjects.static final classThis class contains static reader methods forGenotypeobjects.static final classReader methods forIntegerChromosomeobjects.static final classReader methods forLongChromosomeobjects.static final classReader methods forPermutationChromosomeobjects. -
Method Summary
Modifier and TypeMethodDescriptionstatic <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 Details
-
read
public static <A,G extends Gene<A, List<Genotype<G>> readG>, C extends Chromosome<G>> (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:
-