public static <A> EnumGene<A> of(final ISeq<? extends A> validAlleles) {
		return new EnumGene<>(
			RandomRegistry.random().nextInt(validAlleles.length()),
			validAlleles
		);
	}
Return a new enum gene with an allele randomly chosen from the given
valid alleles.

@param <A> the allele type
@param validAlleles the sequence of valid alleles.
@return a new {@code EnumGene} with a randomly chosen allele from the
        sequence of valid alleles
@throws java.lang.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