## 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

Constructor Summary
`OrderNSymbolList(SymbolList source, int order)` Create an order n OrderNSymbolList from source.

Method Summary
`Alphabet` `getAlphabet()` The alphabet that this SymbolList is over.
`SymbolList` `getSource()` Retrieve the underlying SymbolList being viewed.
`int` `length()` The number of symbols in this SymbolList.
`Symbol` `symbolAt(int index)` Return the symbol at index, counting from 1.

Methods inherited from class org.biojava.bio.symbol.AbstractSymbolList
`iterator, seqString, subList, subStr, toList`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### OrderNSymbolList

    public OrderNSymbolList(SymbolList source,
                            int order)
                     throws IllegalAlphabetException

  Create an order n OrderNSymbolList from source.

Method Detail

### 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