public char[] toArray(final char[] array) {
		final char[] a = array.length >= length()
			? array
			: new char[length()];

		for (int i = length(); --i >= 0;) {
			a[i] = charAt(i);
		}

		return a;
	}
Returns a char array containing all the elements in this chromosome
in a proper sequence.  If the chromosome fits in the specified array, it is
returned therein. Otherwise, a new array is allocated with the length of
this chromosome.

@since 3.0

@param array the array into which the elements of this chromosome are to
       be stored, if it is big enough; otherwise, a new array is
       allocated for this purpose.
@return an array containing the elements of this chromosome
@throws NullPointerException if the given {@code array} is {@code null}
jenetics/src/main/java/io/jenetics/CharacterChromosome.java