@Override
	public IntegerGene newInstance(final Number allele) {
		final int value = allele instanceof Double || allele instanceof Float
			? (int)Math.round(allele.doubleValue())
			: allele.intValue();

		return IntegerGene.of(value, _min, _max);
	}
Create a new gene from the given {@code value} and the gene context.

@since 5.0
@param allele the value of the new gene.
@return a new gene with the given value.
jenetics/src/main/java/io/jenetics/IntegerGene.java