|
||||||||||
| 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,
java.lang.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(java.lang.Object o)
Sequences are compared by their taxa |
boolean |
equals(java.lang.Object o)
|
java.lang.Object |
getAttribute(java.lang.String name)
|
java.util.Map<java.lang.String,java.lang.Object> |
getAttributeMap()
Gets the entire attribute map. |
java.util.Set<java.lang.String> |
getAttributeNames()
|
java.lang.String |
getCleanString()
|
int |
getLength()
Returns the length of the sequence |
byte[] |
getSequenceCharacters()
Get the sequence characters representing the sequence. |
SequenceType |
getSequenceType()
|
State |
getState(int site)
|
byte[] |
getStateIndices()
|
State[] |
getStates()
|
java.lang.String |
getString()
|
Taxon |
getTaxon()
|
int |
hashCode()
|
void |
removeAttribute(java.lang.String name)
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets an named attribute for this object. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BasicSequence(SequenceType sequenceType,
Taxon taxon,
java.lang.CharSequence sequenceString)
taxon - sequenceString -
public BasicSequence(SequenceType sequenceType,
Taxon taxon,
State[] states)
taxon - sequenceType - states - | Method Detail |
|---|
public SequenceType getSequenceType()
getSequenceType in interface Sequencepublic java.lang.String getString()
getString in interface Sequencepublic java.lang.String getCleanString()
public State[] getStates()
getStates in interface Sequencepublic byte[] getStateIndices()
getStateIndices in interface Sequencepublic byte[] getSequenceCharacters()
public State getState(int site)
getState in interface Sequencepublic int getLength()
getLength in interface Sequencepublic Taxon getTaxon()
getTaxon in interface Sequencepublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableo - another sequence
public java.lang.String toString()
toString in class java.lang.Object
public void setAttribute(java.lang.String name,
java.lang.Object value)
Attributable
setAttribute in interface Attributablename - the name of the attribute.value - the new value of the attribute.public java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface Attributablename - the name of the attribute of interest, or null if the attribute doesn't exist.
public void removeAttribute(java.lang.String name)
removeAttribute in interface Attributablename - name of attribute to removepublic java.util.Set<java.lang.String> getAttributeNames()
getAttributeNames in interface Attributablepublic java.util.Map<java.lang.String,java.lang.Object> getAttributeMap()
Attributable
getAttributeMap in interface Attributablepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||