Class DiscreteCharacter
java.lang.Object
jebl.evolution.characters.DiscreteCharacter
- All Implemented Interfaces:
Character
-
Constructor Summary
ConstructorsConstructorDescriptionDiscreteCharacter(String name, String desc, int numOfStates) Constructs a basic DiscreteCharacter object with no taxa added yetDiscreteCharacter(String name, String desc, int numOfStates, Set<Taxon> taxa) Constructs a basic DiscreteCharacter object with taxa -
Method Summary
Modifier and TypeMethodDescriptionvoidadd a taxon with this charactergetDesc()return the description of the charactergetName()return the name of the characterdoublegetStateDesc(int state) getTaxa()get a Setof all the taxa for this character getType()return the CharacterType of the characterget a value for a taxon containing the characterbooleanvoidset the description of the charactervoidsetIsOrdered(boolean isOrdered) voidset the name of the charactervoidsetNumOfStates(int numOfStates) voidsetStateDesc(Map<Integer, String> stateDesc)
-
Constructor Details
-
DiscreteCharacter
-
DiscreteCharacter
Constructs a basic DiscreteCharacter object with taxa- Parameters:
name- the name of the characterdesc- the description of the characternumOfStates- the number of possible states for the charactertaxa- the Setcontaining the taxa with this character
-
-
Method Details
-
setName
-
getName
-
setDesc
-
getDesc
-
getType
Description copied from interface:Characterreturn the CharacterType of the character -
addTaxon
-
getValue
-
isOrdered
public boolean isOrdered()- Returns:
- whether character is ordered or not
-
setIsOrdered
public void setIsOrdered(boolean isOrdered) - Parameters:
isOrdered- set whether character is ordered or not
-
getNumOfStates
public double getNumOfStates()- Returns:
- the number of possible states for the character
-
setNumOfStates
public void setNumOfStates(int numOfStates) - Parameters:
numOfStates- the number of possible states for the characeter
-
getTaxa
-
setStateDesc
-
getStateDesc
-
getStateDesc
- Parameters:
state- corresponding to the state- Returns:
- state description
-