public static InvertibleCodec<int[], IntegerGene> ofVector(
		final IntRange domain,
		final IntRange length
	) {
		requireNonNull(domain);
		Requires.positive(length.min());

		return InvertibleCodec.of(
			Genotype.of(IntegerChromosome.of(domain, length)),
			gt -> gt.chromosome().as(IntegerChromosome.class).toArray(),
			val -> Genotype.of(
				IntegerChromosome.of(
					IntStream.of(val)
						.mapToObj(i -> IntegerGene.of(i, domain))
						.collect(ISeq.toISeq())
				)
			)
		);
	}
Return a vector {@link InvertibleCodec} for the given range. All vector
values are restricted by the same domain.

@since 7.0

@param domain the domain of the vector values
@param length the vector length range
@return a new vector {@code Codec}
@throws NullPointerException if the given {@code domain} is {@code null}
@throws IllegalArgumentException if the {@code length} is smaller than
        one.
jenetics/src/main/java/io/jenetics/engine/Codecs.java