Interface ITaxonBuilder


public interface ITaxonBuilder
Builder for a taxon that allows defining subtaxa and adding species to a taxon.
  • Method Details

    • defineSubTaxon

      void defineSubTaxon(String name)
      Defines a taxon with this taxon as the its parent. Do not use with species names, species are set by the ISpeciesBuilder.
      Parameters:
      name - The name of the taxon. Must be unique.
      Throws:
      UnsupportedOperationException - If this taxon is a genus. Species names are set by the species builder.
    • defineSubTaxon

      void defineSubTaxon(String name, Consumer<ITaxonBuilder> action)
      Defines and configures a taxon with this taxon as its parent.
      Parameters:
      name - The name of the taxon. Must be unique.
      action - A consumer that adds additional information to the taxon after it is created.
    • setDefaultChromosome

      default <A extends IAllele> void setDefaultChromosome(IChromosome<A> chromosome, A value)
      Sets the default allele for the given chromosome for all members of this taxon.
      Parameters:
      chromosome - The chromosome to set.
      value - The default allele of the chromosome.
      Throws:
      UnsupportedOperationException - If a member of this taxon does not have this chromosome.
    • setDefaultChromosome

      <A extends IAllele> void setDefaultChromosome(IChromosome<A> chromosome, A value, boolean required)
      Sets the default allele for the given chromosome for all members of this taxon.
      Parameters:
      chromosome - The chromosome to set.
      value - The default allele of this chromosome.
      required - If true, throws an exception if a member of the taxon does not have this chromosome.
      Throws:
      UnsupportedOperationException - If required is true and a member of this taxon does not have this chromosome.