Package jebl.evolution.sequences
Class FilteredSequence
java.lang.Object
jebl.evolution.sequences.FilteredSequence
- All Implemented Interfaces:
Comparable,Sequence,Attributable
- Direct Known Subclasses:
GaplessSequence,TranslatedSequence
- Version:
- $Id: FilteredSequence.java 641 2007-02-16 11:56:21Z rambaut $
- Author:
- rambaut, Alexei Drummond
-
Nested Class Summary
Nested classes/interfaces inherited from interface jebl.util.Attributable
Attributable.Utils -
Constructor Summary
ConstructorsConstructorDescriptionFilteredSequence(Sequence source) Creates a FilteredSequence wrapper to the given source sequence. -
Method Summary
Modifier and TypeMethodDescriptionintgetAttribute(String name) Gets the entire attribute map.intReturns the length of the sequencegetState(int site) byte[]State[]getTaxon()voidremoveAttribute(String name) voidsetAttribute(String name, Object value) Sets an named attribute for this object.toString()
-
Constructor Details
-
FilteredSequence
Creates a FilteredSequence wrapper to the given source sequence.- Parameters:
source-
-
-
Method Details
-
getSequenceType
- Specified by:
getSequenceTypein interfaceSequence- Returns:
- the type of symbols that this sequence is made up of.
-
getString
-
getStates
-
getStateIndices
public byte[] getStateIndices()- Specified by:
getStateIndicesin interfaceSequence- Returns:
- an array of state indices.
-
getState
-
getLength
public int getLength()Returns the length of the sequence -
getTaxon
-
compareTo
- Specified by:
compareToin interfaceComparable
-
toString
-
setAttribute
Description copied from interface:AttributableSets an named attribute for this object.- Specified by:
setAttributein interfaceAttributable- Parameters:
name- the name of the attribute.value- the new value of the attribute.
-
getAttribute
- Specified by:
getAttributein interfaceAttributable- Parameters:
name- the name of the attribute of interest, or null if the attribute doesn't exist.- Returns:
- an object representing the named attributed for this object.
-
removeAttribute
- Specified by:
removeAttributein interfaceAttributable- Parameters:
name- name of attribute to remove
-
getAttributeNames
- Specified by:
getAttributeNamesin interfaceAttributable- Returns:
- an array of the attributeNames that this object has.
-
getAttributeMap
Description copied from interface:AttributableGets the entire attribute map.- Specified by:
getAttributeMapin interfaceAttributable- Returns:
- an unmodifiable map
-