java.lang.Object
io.jenetics.xml.Writers.BoundedChromosome
- Enclosing class:
Writers
This class contains static writer methods for
BoundedChromosome
objects.
XML template
<root-name length="3">
<min>aaa</min>
<max>zzz</max>
<alleles>
<allele>iii</allele>
<allele>fff</allele>
<allele>ggg</allele>
</alleles>
</root-name>
-
Method Summary
Modifier and TypeMethodDescriptionstatic <A extends Comparable<? super A>,
G extends BoundedGene<A, G>, C extends BoundedChromosome<A, G>>
Writer<C> Create a bounded chromosome writer with the given configuration.
-
Method Details
-
writer
public static <A extends Comparable<? super A>,G extends BoundedGene<A, Writer<C> writerG>, C extends BoundedChromosome<A, G>> (String rootName, Writer<? super A> alleleWriter) Create a bounded chromosome writer with the given configuration.- Type Parameters:
A
- the allele typeG
- the bounded gene typeC
- the bounded chromosome type- Parameters:
rootName
- the name of the root element. E.g.int-chromosome
alleleWriter
- the XML writer used for the alleles- Returns:
- a bounded chromosome XML writer
- Throws:
NullPointerException
- if one of the arguments isnull
-