public static <A> Codec<ISeq<A>, AnyGene<A>> ofVector(
		final Supplier<? extends A> supplier,
		final Predicate<? super A> alleleValidator,
		final Predicate<? super ISeq<A>> alleleSeqValidator,
		final int length
	) {
		requireNonNull(supplier);
		requireNonNull(alleleSeqValidator);
		requireNonNull(alleleSeqValidator);
		Requires.positive(length);

		return Codec.of(
			Genotype.of(AnyChromosome
				.of(supplier, alleleValidator, alleleSeqValidator, length)),
			gt -> gt.chromosome().stream()
				.map(Gene::allele)
				.collect(ISeq.toISeq())
		);
	}
Return a scala {@link Codec} with the given allele {@link Supplier},
allele {@code validator} and {@code Chromosome} length. The
{@code supplier} is responsible for creating new random alleles, and the
{@code validator} can verify it.
<p>
The following example shows a codec which creates and verifies
{@code BigInteger} object arrays.
{@snippet lang="java":
final Codec<BigInteger[], AnyGene<BigInteger>> codec = Codecs.of(
    // Create new random 'BigInteger' object.
    () -> {
        final byte[] data = new byte[100];
        RandomRegistry.getRandom().nextBytes(data);
        return new BigInteger(data);
    },
    // Verify that bit 7 is set. (For illustration purpose.)
    bi -> bi.testBit(7),
    // The 'Chromosome' length.
    123
);
}

@see AnyChromosome#of(Supplier, Predicate, Predicate, int)

@param <A> the allele type
@param supplier the allele-supplier which is used for creating new,
       random alleles
@param alleleValidator the validator used for validating the created gene.
       This predicate is used in the {@link AnyGene#isValid()} method.
@param alleleSeqValidator the validator used for validating the created
       chromosome. This predicate is used in the
       {@link AnyChromosome#isValid()} method.
@param length the vector length
@return a new {@code Codec} with the given parameters
@throws NullPointerException if one of the parameters is {@code null}
@throws IllegalArgumentException if the length of the vector is smaller
        than one.
jenetics/src/main/java/io/jenetics/engine/Codecs.java