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 TypeMethodDescriptionint
getAttribute
(String name) Gets the entire attribute map.int
Returns the length of the sequencegetState
(int site) byte[]
State[]
getTaxon()
void
removeAttribute
(String name) void
setAttribute
(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:
getSequenceType
in interfaceSequence
- Returns:
- the type of symbols that this sequence is made up of.
-
getString
-
getStates
-
getStateIndices
public byte[] getStateIndices()- Specified by:
getStateIndices
in interfaceSequence
- Returns:
- an array of state indices.
-
getState
-
getLength
public int getLength()Returns the length of the sequence -
getTaxon
-
compareTo
- Specified by:
compareTo
in interfaceComparable
-
toString
-
setAttribute
Description copied from interface:Attributable
Sets an named attribute for this object.- Specified by:
setAttribute
in interfaceAttributable
- Parameters:
name
- the name of the attribute.value
- the new value of the attribute.
-
getAttribute
- Specified by:
getAttribute
in 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:
removeAttribute
in interfaceAttributable
- Parameters:
name
- name of attribute to remove
-
getAttributeNames
- Specified by:
getAttributeNames
in interfaceAttributable
- Returns:
- an array of the attributeNames that this object has.
-
getAttributeMap
Description copied from interface:Attributable
Gets the entire attribute map.- Specified by:
getAttributeMap
in interfaceAttributable
- Returns:
- an unmodifiable map
-