|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jebl.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 Sequence
public String getString()
getString
in interface Sequence
public String getCleanString()
public State[] getStates()
getStates
in interface Sequence
public byte[] getStateIndices()
getStateIndices
in interface Sequence
public State getState(int site)
getState
in interface Sequence
public int getLength()
getLength
in interface Sequence
public Taxon getTaxon()
getTaxon
in interface Sequence
public int compareTo(Object o)
compareTo
in interface Comparable
o
- another sequence
public void setAttribute(String name, Object value)
Attributable
setAttribute
in interface Attributable
name
- the name of the attribute.value
- the new value of the attribute.public Object getAttribute(String name)
getAttribute
in interface Attributable
name
- the name of the attribute of interest.
public void removeAttribute(String name)
removeAttribute
in interface Attributable
name
- name of attribute to removepublic Set<String> getAttributeNames()
getAttributeNames
in interface Attributable
public 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 |