Interface IGenome


public interface IGenome
Holds the AllelePairs which comprise the traits of a given individual.
  • Method Details

    • getAllelePairs

      com.google.common.collect.ImmutableList<AllelePair<?>> getAllelePairs()
      Returns:
      A array with all chromosomes of this genome.
    • getAllelePair

      <A extends IAllele> AllelePair<A> getAllelePair(IChromosome<A> chromosomeType)
      Returns the allele pair containing the active and inactive alleles of the given chromosome. Uses an unchecked cast.
      Returns:
      The allele pair for the given chromosome.
    • isDefaultGenome

      boolean isDefaultGenome()
      Returns:
      true if this genome is equal to the default genome of the species, as specified in the Karyotype.
    • getKaryotype

      IKaryotype getKaryotype()
      Returns:
      The karyotype of this genome. It defines the positions of the chromosomes in the array and the length of it.
    • getChromosomes

      com.google.common.collect.ImmutableMap<IChromosome<?>,AllelePair<?>> getChromosomes()
    • copyWith

      default IGenome copyWith(Map<IChromosome<?>,IAllele> alleles)
      Copies this genome, setting active and inactive alleles using the given map. If the resulting genome is the same as this genome, then no copy is made.
      Parameters:
      alleles - Map of alleles that should be in the copy.
      Returns:
      A copy of this genome with alleles from the given map. If result is equal to this, then just returns this.
    • copyWithPairs

      IGenome copyWithPairs(Map<IChromosome<?>,AllelePair<?>> allelePairs)
      Copies this genome, setting active and inactive alleles using the given map. If the resulting genome is the same as this genome, then no copy is made.
      Parameters:
      allelePairs - Map of allele pairs that should be in the copy.
      Returns:
      The new genome.
    • isSameAlleles

      boolean isSameAlleles(IGenome other)
      Returns:
      true if this genome has the same karyotype and alleles as the other genome.
    • getActiveAllele

      default <A extends IAllele> A getActiveAllele(IChromosome<A> chromosome)
      Returns:
      The active allele of the chromosome with the given type.
    • getActiveValue

      default float getActiveValue(IFloatChromosome chromosome)
    • getActiveValue

      default boolean getActiveValue(IBooleanChromosome chromosome)
    • getActiveValue

      default int getActiveValue(IIntegerChromosome chromosome)
    • getActiveValue

      default <V> V getActiveValue(IValueChromosome<V> chromosome)
    • getInactiveAllele

      default <A extends IAllele> A getInactiveAllele(IChromosome<A> chromosome)
      Returns:
      The inactive allele of the chromosome with the given type.
    • getInactiveValue

      default float getInactiveValue(IFloatChromosome chromosome)
    • getInactiveValue

      default boolean getInactiveValue(IBooleanChromosome chromosome)
    • getInactiveValue

      default int getInactiveValue(IIntegerChromosome chromosome)
    • getInactiveValue

      default <V> V getInactiveValue(IValueChromosome<V> chromosome)
    • getActiveName

      default net.minecraft.network.chat.MutableComponent getActiveName(IFloatChromosome chromosome)
    • getActiveName

      default net.minecraft.network.chat.MutableComponent getActiveName(IBooleanChromosome chromosome)
    • getActiveName

      default net.minecraft.network.chat.MutableComponent getActiveName(IIntegerChromosome chromosome)
    • getActiveName

      default <V> net.minecraft.network.chat.MutableComponent getActiveName(IValueChromosome<V> chromosome)
    • getInactiveName

      default net.minecraft.network.chat.MutableComponent getInactiveName(IFloatChromosome chromosome)
    • getInactiveName

      default net.minecraft.network.chat.MutableComponent getInactiveName(IBooleanChromosome chromosome)
    • getInactiveName

      default net.minecraft.network.chat.MutableComponent getInactiveName(IIntegerChromosome chromosome)
    • getInactiveName

      default <V> net.minecraft.network.chat.MutableComponent getInactiveName(IValueChromosome<V> chromosome)
    • getActiveSpecies

      default <S extends ISpecies<?>> S getActiveSpecies()
      Note: Use IIndividual.getSpecies() whenever possible.
      Returns:
      The active species of the individual.
    • getInactiveSpecies

      default <S extends ISpecies<?>> S getInactiveSpecies()
      Note: Use IIndividual.getInactiveSpecies() whenever possible.
      Returns:
      The inactive species of the individual.