Constructor and Description |
---|
DiscreteCharacter(java.lang.String name,
java.lang.String desc,
int numOfStates)
Constructs a basic DiscreteCharacter object with no taxa added yet
|
DiscreteCharacter(java.lang.String name,
java.lang.String desc,
int numOfStates,
java.util.Set<Taxon> taxa)
Constructs a basic DiscreteCharacter object with taxa
|
Modifier and Type | Method and Description |
---|---|
void |
addTaxon(Taxon taxon)
add a taxon with this character
|
java.lang.String |
getDesc()
return the description of the character
|
java.lang.String |
getName()
return the name of the character
|
double |
getNumOfStates() |
java.util.Map<java.lang.Integer,java.lang.String> |
getStateDesc() |
java.lang.String |
getStateDesc(int state) |
java.util.Set<Taxon> |
getTaxa()
get a Set
|
CharacterType |
getType()
return the CharacterType of the character
|
java.lang.Object |
getValue(Taxon taxon)
get a value for a taxon containing the character
|
boolean |
isOrdered() |
void |
setDesc(java.lang.String desc)
set the description of the character
|
void |
setIsOrdered(boolean isOrdered) |
void |
setName(java.lang.String name)
set the name of the character
|
void |
setNumOfStates(int numOfStates) |
void |
setStateDesc(java.util.Map<java.lang.Integer,java.lang.String> stateDesc) |
public DiscreteCharacter(java.lang.String name, java.lang.String desc, int numOfStates)
name
- the name of the characterdesc
- the description of the characternumOfStates
- the number of possible states for the characterpublic DiscreteCharacter(java.lang.String name, java.lang.String desc, int numOfStates, java.util.Set<Taxon> taxa)
name
- the name of the characterdesc
- the description of the characternumOfStates
- the number of possible states for the charactertaxa
- the Setpublic void setName(java.lang.String name)
Character
public java.lang.String getName()
Character
public void setDesc(java.lang.String desc)
Character
public java.lang.String getDesc()
Character
public CharacterType getType()
Character
public void addTaxon(Taxon taxon)
Character
public java.lang.Object getValue(Taxon taxon)
Character
public boolean isOrdered()
public void setIsOrdered(boolean isOrdered)
isOrdered
- set whether character is ordered or notpublic double getNumOfStates()
public void setNumOfStates(int numOfStates)
numOfStates
- the number of possible states for the characeterpublic java.util.Set<Taxon> getTaxa()
Character
public void setStateDesc(java.util.Map<java.lang.Integer,java.lang.String> stateDesc)
stateDesc
- a Mappublic java.util.Map<java.lang.Integer,java.lang.String> getStateDesc()
public java.lang.String getStateDesc(int state)
state
- corresponding to the statehttp://code.google.com/p/jebl2/