Class Writers.BoundedChromosome

java.lang.Object
io.jenetics.xml.Writers.BoundedChromosome
Enclosing class:
Writers

public static final class Writers.BoundedChromosome extends Object
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 Details

    • writer

      public static <A extends Comparable<? super A>, G extends BoundedGene<A, G>, C extends BoundedChromosome<A, G>> Writer<C> writer(String rootName, Writer<? super A> alleleWriter)
      Create a bounded chromosome writer with the given configuration.
      Type Parameters:
      A - the allele type
      G - the bounded gene type
      C - 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 is null