org.biojava.bio.symbol
Class WindowedSymbolList
java.lang.Object
|
+--org.biojava.bio.symbol.AbstractSymbolList
|
+--org.biojava.bio.symbol.WindowedSymbolList
- public class WindowedSymbolList
- extends AbstractSymbolList
- implements java.io.Serializable
A view of windows onto another SymbolList.
In practice, what this means is that you can view a DNA sequence as codons which
do not overlap.
- Author:
- Matthew Pocock
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
WindowedSymbolList
public WindowedSymbolList(SymbolList source,
int width)
throws java.lang.IllegalArgumentException
- Create a WindowedSymbolList with the given window width.
getSource
public SymbolList getSource()
- Retrieve the underlying SymbolList being viewed.
- Returns:
- the source SymbolList
getAlphabet
public Alphabet getAlphabet()
- Description copied from interface: SymbolList
- The alphabet that this SymbolList is over.
Every symbol within this SymbolList is a member of this alphabet.
alphabet.contains(symbol) == true
for each symbol that is within this sequence.
- Overrides:
- getAlphabet in class AbstractSymbolList
- Tags copied from interface: SymbolList
- Returns:
- the alphabet
length
public int length()
- Description copied from interface: SymbolList
- The number of symbols in this SymbolList.
- Overrides:
- length in class AbstractSymbolList
- Tags copied from interface: SymbolList
- Returns:
- the length
symbolAt
public Symbol symbolAt(int index)
throws java.lang.IndexOutOfBoundsException
- Description copied from interface: SymbolList
- Return the symbol at index, counting from 1.
- Overrides:
- symbolAt in class AbstractSymbolList
- Tags copied from interface: SymbolList
- Parameters:
index
- the ofset into this SymbolList- Returns:
- the Symbol at that index
- Throws:
- java.lang.IndexOutOfBoundsException - if index is less than 1, or greater than
the length of the symbol list