public static final class Writers.BitChromosome extends Object
BitChromosome
objects.
Writer code
final BitChromosome value = BitChromosome.of(20, 0.5);
try (AutoCloseableXMLStreamWriter xml = XML.writer(System.out, " ")) {
Writers.BitChromosome.writer().write(value, xml);
}
<bit-chromosome length="20" ones-probability="0.5">11100011101011001010</bit-chromosome>
Modifier and Type | Method and Description |
---|---|
static void |
write(OutputStream out,
BitChromosome data)
Write the given
BitChromosome to the given
output stream. |
static Writer<BitChromosome> |
writer()
Return a
Writer for BitChromosome
objects. |
public static Writer<BitChromosome> writer()
Writer
for BitChromosome
objects.public static void write(OutputStream out, BitChromosome data) throws XMLStreamException
BitChromosome
to the given
output stream.out
- the target output streamdata
- the bit-chromosome to writeXMLStreamException
- if an error occurs while writing the
chromosomeNullPointerException
- if one of the given arguments is
null
© 2007-2019 Franz Wilhelmstötter (2019-11-18 20:30)