jebl.evolution.sequences
Class FilteredSequence

java.lang.Object
  extended by jebl.evolution.sequences.FilteredSequence
All Implemented Interfaces:
java.lang.Comparable, Sequence, Attributable
Direct Known Subclasses:
GaplessSequence, TranslatedSequence

public abstract class FilteredSequence
extends java.lang.Object
implements Sequence

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
FilteredSequence(Sequence source)
          Creates a FilteredSequence wrapper to the given source sequence.
 
Method Summary
 int compareTo(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()
           
 int getLength()
          Returns the length of the sequence
 SequenceType getSequenceType()
           
 State getState(int site)
           
 byte[] getStateIndices()
           
 State[] getStates()
           
 java.lang.String getString()
           
 Taxon getTaxon()
           
 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FilteredSequence

public FilteredSequence(Sequence source)
Creates a FilteredSequence wrapper to the given source sequence.

Parameters:
source -
Method Detail

getSequenceType

public SequenceType getSequenceType()
Specified by:
getSequenceType in interface Sequence
Returns:
the type of symbols that this sequence is made up of.

getString

public java.lang.String getString()
Specified by:
getString in interface Sequence
Returns:
a string representing the sequence of symbols.

getStates

public State[] getStates()
Specified by:
getStates in interface Sequence
Returns:
an array of state objects.

getStateIndices

public byte[] getStateIndices()
Specified by:
getStateIndices in interface Sequence
Returns:
an array of state indices.

getState

public State getState(int site)
Specified by:
getState in interface Sequence
Returns:
the state at site.

getLength

public int getLength()
Returns the length of the sequence

Specified by:
getLength in interface Sequence
Returns:
the length

getTaxon

public Taxon getTaxon()
Specified by:
getTaxon in interface Sequence
Returns:
that taxon that this sequence represents

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Description copied from interface: Attributable
Sets an named attribute for this object.

Specified by:
setAttribute in interface Attributable
Parameters:
name - the name of the attribute.
value - the new value of the attribute.

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Specified by:
getAttribute in interface Attributable
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

public void removeAttribute(java.lang.String name)
Specified by:
removeAttribute in interface Attributable
Parameters:
name - name of attribute to remove

getAttributeNames

public java.util.Set<java.lang.String> getAttributeNames()
Specified by:
getAttributeNames in interface Attributable
Returns:
an array of the attributeNames that this object has.

getAttributeMap

public java.util.Map<java.lang.String,java.lang.Object> getAttributeMap()
Description copied from interface: Attributable
Gets the entire attribute map.

Specified by:
getAttributeMap in interface Attributable
Returns:
an unmodifiable map


http://code.google.com/p/jebl2/