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
Modifier and TypeClassDescriptionstatic final class
Bit chromosome reader methods, which reads XML-representations of bit-chromosomes.static final class
Reader methods forBoundedChromosome
objects.static final class
Reader methods forCharacterChromosome
objects.static final class
Reader methods forDoubleChromosome
objects.static final class
Writer methods forGenotype
objects.static final class
This class contains static reader methods forGenotype
objects.static final class
Reader methods forIntegerChromosome
objects.static final class
Reader methods forLongChromosome
objects.static final class
Reader methods forPermutationChromosome
objects. -
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:
-