public static <A> EnumGene<A> of(
		final int alleleIndex,
		final ISeq<? extends A> validAlleles
	) {
		return new EnumGene<>(alleleIndex, validAlleles);
	}
Create a new enum gene from the given valid genes and the chosen allele
index.

@since 3.4

@param <A> the allele type
@param alleleIndex the index of the allele for this gene
@param validAlleles the sequence of valid alleles
@return a new {@code EnumGene} with the given with the allele
       {@code validAlleles.get(alleleIndex)}
@throws IllegalArgumentException if the give valid alleles sequence is
        empty
@throws NullPointerException if the valid alleles seq is {@code null}.
jenetics/src/main/java/io/jenetics/EnumGene.java