Package forestry.api.plugin
Interface ITaxonBuilder
public interface ITaxonBuilder
Builder for a taxon that allows defining subtaxa and adding species to a taxon.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddefineSubTaxon(String name) Defines a taxon with this taxon as the its parent.voiddefineSubTaxon(String name, Consumer<ITaxonBuilder> action) Defines and configures a taxon with this taxon as its parent.default <A extends IAllele>
voidsetDefaultChromosome(IChromosome<A> chromosome, A value) Sets the default allele for the given chromosome for all members of this taxon.<A extends IAllele>
voidsetDefaultChromosome(IChromosome<A> chromosome, A value, boolean required) Sets the default allele for the given chromosome for all members of this taxon.
-
Method Details
-
defineSubTaxon
Defines a taxon with this taxon as the its parent. Do not use with species names, species are set by theISpeciesBuilder.- 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
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
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
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 istrueand a member of this taxon does not have this chromosome.
-