default <C extends Chromosome<G>> C as(final Class<C> type) {
		return type.cast(this);
	}
Casts this {@code Chromosome} to an instance of type {@code C}.
This is a convenient method for an ordinary cast and allows seamless
method-chaining. Instead of
{@snippet lang="java":
final Genotype<BitGene> gt = null; // @replace substring='null' replacement="..."
final int count = ((BitChromosome)gt.chromosome()).bitCount();
}
you can write
{@snippet lang="java":
final Genotype<BitGene> gt = null; // @replace substring='null' replacement="..."
final int count = gt.chromosome()
    .as(BitChromosome.class)
    .bitCount();
}
This may lead to a more elegant programming style in some cases.

@since 3.7

@param type the target type class
@param <C> the target chromosome type
@return this chromosome cast as {@code C}
@throws NullPointerException if the target type class is {@code null}
@throws ClassCastException if this chromosome can't be cast to a
        chromosome of type {@code C}
jenetics/src/main/java/io/jenetics/Chromosome.java