Interface IChromosomeBuilder<A extends IAllele>

Type Parameters:
A - The type of alleles that represent this chromosome.

public interface IChromosomeBuilder<A extends IAllele>
Interface for customizing a default chromosome in a karyotype.
  • Method Details

    • addAlleles

      IChromosomeBuilder<A> addAlleles(List<A> alleles)
      Add alleles as valid values for this chromosome.
    • setDefault

      IChromosomeBuilder<A> setDefault(A allele)
      Override the default value of this chromosome that was previously set in IKaryotypeBuilder.set(forestry.api.genetics.alleles.IChromosome<A>, A).
    • setWeaklyInherited

      IChromosomeBuilder<A> setWeaklyInherited(boolean weaklyInherited)
      Sets whether this chromosome "weakly inherited."

      If a chromosome is weakly inherited, then its default allele will always be overridden by a non-default allele during inheritance or mutations. An example in Forestry is the temperature and humidity tolerance chromosomes, which are weakly inherited. This ensures that breeding a Common bee using a Modest princess and Savanna drone will produce a Common bee that can survive either in the Savanna or in the Desert, instead of a Common bee that can only survive in the plains biome like in older versions of Forestry.

      Parameters:
      weaklyInherited - Whether this chromosome should be weakly inherited.