|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjebl.evolution.sequences.BasicSequence
public class BasicSequence
A default implementation of the Sequence interface.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface jebl.util.Attributable |
|---|
Attributable.Utils |
| Constructor Summary | |
|---|---|
BasicSequence(SequenceType sequenceType,
Taxon taxon,
CharSequence sequenceString)
Creates a sequence with a name corresponding to the taxon name. |
|
BasicSequence(SequenceType sequenceType,
Taxon taxon,
State[] states)
Creates a sequence with a name corresponding to the taxon name |
|
| Method Summary | |
|---|---|
int |
compareTo(Object o)
Sequences are compared by their taxa |
Object |
getAttribute(String name)
|
Map<String,Object> |
getAttributeMap()
Gets the entire attribute map. |
Set<String> |
getAttributeNames()
|
String |
getCleanString()
|
int |
getLength()
Returns the length of the sequence |
SequenceType |
getSequenceType()
|
State |
getState(int site)
|
byte[] |
getStateIndices()
|
State[] |
getStates()
|
String |
getString()
|
Taxon |
getTaxon()
|
void |
removeAttribute(String name)
|
void |
setAttribute(String name,
Object value)
Sets an named attribute for this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicSequence(SequenceType sequenceType,
Taxon taxon,
CharSequence sequenceString)
taxon - sequenceString -
public BasicSequence(SequenceType sequenceType,
Taxon taxon,
State[] states)
taxon - sequenceType - states - | Method Detail |
|---|
public SequenceType getSequenceType()
getSequenceType in interface Sequencepublic String getString()
getString in interface Sequencepublic String getCleanString()
public State[] getStates()
getStates in interface Sequencepublic byte[] getStateIndices()
getStateIndices in interface Sequencepublic State getState(int site)
getState in interface Sequencepublic int getLength()
getLength in interface Sequencepublic Taxon getTaxon()
getTaxon in interface Sequencepublic int compareTo(Object o)
compareTo in interface Comparableo - another sequence
public void setAttribute(String name,
Object value)
Attributable
setAttribute in interface Attributablename - the name of the attribute.value - the new value of the attribute.public Object getAttribute(String name)
getAttribute in interface Attributablename - the name of the attribute of interest.
public void removeAttribute(String name)
removeAttribute in interface Attributablename - name of attribute to removepublic Set<String> getAttributeNames()
getAttributeNames in interface Attributablepublic Map<String,Object> getAttributeMap()
Attributable
getAttributeMap in interface Attributable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||