static void checkGeneRange(final Stream<?> ranges) {
		if (ranges.distinct().count() > 1) {
			throw new IllegalArgumentException(
				"All genes must have the same range."
			);
		}
	}
Create a new chromosome from the given genes array.

@param genes the genes of the new chromosome.
@throws IllegalArgumentException if the length of the gene sequence is
        empty or doesn't match with the allowed length range.
@throws IllegalArgumentException if the minimum or maximum of the range
        is smaller or equal zero
@throws IllegalArgumentException if the given range size is zero
@throws NullPointerException if the {@code genes} are {@code null}.
jenetics/src/main/java/io/jenetics/AbstractBoundedChromosome.java