|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjebl.evolution.characters.DiscreteCharacter
public class DiscreteCharacter
| Constructor Summary | |
|---|---|
DiscreteCharacter(String name,
String desc,
int numOfStates)
Constructs a basic DiscreteCharacter object with no taxa added yet |
|
DiscreteCharacter(String name,
String desc,
int numOfStates,
Set<Taxon> taxa)
Constructs a basic DiscreteCharacter object with taxa |
|
| Method Summary | |
|---|---|
void |
addTaxon(Taxon taxon)
add a taxon with this character |
String |
getDesc()
return the description of the character |
String |
getName()
return the name of the character |
double |
getNumOfStates()
|
Map<Integer,String> |
getStateDesc()
|
String |
getStateDesc(int state)
|
Set<Taxon> |
getTaxa()
get a Set |
CharacterType |
getType()
return the CharacterType of the character |
Object |
getValue(Taxon taxon)
get a value for a taxon containing the character |
boolean |
isOrdered()
|
void |
setDesc(String desc)
set the description of the character |
void |
setIsOrdered(boolean isOrdered)
|
void |
setName(String name)
set the name of the character |
void |
setNumOfStates(int numOfStates)
|
void |
setStateDesc(Map<Integer,String> stateDesc)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DiscreteCharacter(String name,
String desc,
int numOfStates)
name - the name of the characterdesc - the description of the characternumOfStates - the number of possible states for the character
public DiscreteCharacter(String name,
String desc,
int numOfStates,
Set<Taxon> taxa)
name - the name of the characterdesc - the description of the characternumOfStates - the number of possible states for the charactertaxa - the Set| Method Detail |
|---|
public void setName(String name)
Character
setName in interface Charactername - the name of the characterpublic String getName()
Character
getName in interface Characterpublic void setDesc(String desc)
Character
setDesc in interface Characterdesc - the description of the characterpublic String getDesc()
Character
getDesc in interface Characterpublic CharacterType getType()
Character
getType in interface Characterpublic void addTaxon(Taxon taxon)
Character
addTaxon in interface Charactertaxon - the taxon to add containing the characterpublic Object getValue(Taxon taxon)
Character
getValue in interface Charactertaxon - the taxon to get the value for
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 Set<Taxon> getTaxa()
Character
getTaxa in interface Characterpublic void setStateDesc(Map<Integer,String> stateDesc)
stateDesc - a Mappublic Map<Integer,String> getStateDesc()
public String getStateDesc(int state)
state - corresponding to the state
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||