org.biojava.bio.symbol
Class OrderNSymbolList
java.lang.Object
|
+--org.biojava.bio.symbol.AbstractSymbolList
|
+--org.biojava.bio.symbol.OrderNSymbolList
- public class OrderNSymbolList
- extends AbstractSymbolList
- implements java.io.Serializable
An n-th order view of another SymbolList.
In practice, what this means is that you can view a DNA sequence into an
overlapping dinucleotide sequence without having to do any work yourself.
- 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 |
OrderNSymbolList
public OrderNSymbolList(SymbolList source,
int order)
throws IllegalAlphabetException
- Create an order n OrderNSymbolList from source.
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