Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.ac.man.bioinf.sequence
Interface Sequence

All Superinterfaces:
  Identifiable

All Known Subinterfaces:
  ComplexEditableGappedSequence, ComplexSequence, ConsensusSequence, EditableSequence, GappedComplexSequence, GappedSequence, MutableSequence

All Known Implementing Classes:
  AbstractComplexSequence, AbstractEditableSequence, AbstractGappedSequence, AbstractMutableSequence, AbstractSequence, DefaultConsensusSequence, DefaultEditableSequence, DefaultGappedComplexSequence, EmptyGappedSequence, EmptySequence

public interface Sequence
extends Identifiable

Sequence.java This interface is designed to model a biological sequence. It is non-specific in the manor in which a sequence may be implemented. The default implementation of this sequence will be imutable, and all sequence numbering will start at 1 NOT 0. This may be a set of rules worth following. For a mutable sequence, see the interface MutableSequence.

Version:
  $Id: Sequence.java,v 1.5 2001/04/11 17:04:43 lord Exp $
Author:
  J Selley
See Also:
  `Created: Fri Feb 25 19:21:55 2000`

Method Summary
`Element` | `getElementAt(int index)` Returns an element at a given location.
`char` | `getElementAtAsChar(int index)` Returns the character of an target element.
`int` | `getLength()` Returns the length of the sequence.
`char[]` | `getSequenceAsChars()` Returns the sequence as an array of characters.
`Element[]` | `getSequenceAsElements()` Returns the sequence as an array of elements.
`SequenceType` | `getSequenceType()` Returns the type of sequence.
`Sequence` | `getSubSequence(int from, int length)` Returns a sub-sequence from the current sequence.

Methods inherited from interface uk.ac.man.bioinf.sequence.identifier.Identifiable
`getIdentifier`

Method Detail

### getSubSequence

    public Sequence getSubSequence(int from,
                                   int length)

  Returns a sub-sequence from the current sequence.

  Parameters:
    `from` - the initial index of the sub-sequence
  Returns:
    the sub-sequence

### getSequenceAsChars

    public char[] getSequenceAsChars()

  Returns the sequence as an array of characters.

  Returns:
    the sequence

### getSequenceAsElements

    public Element[] getSequenceAsElements()

  Returns the sequence as an array of elements.

  Returns:
    the sequence

### getElementAtAsChar

    public char getElementAtAsChar(int index)

  Returns the character of an target element.

  Parameters:
    `index` - the location of the target element
  Returns:
    the element character

### getElementAt

    public Element getElementAt(int index)

  Returns an element at a given location.

  Parameters:
    `index` - the location of the target element
  Returns:
    the element

### getSequenceType

    public SequenceType getSequenceType()

  Returns the type of sequence.

  Returns:
    the sequence type

### getLength

    public int getLength()

  Returns the length of the sequence.

  Returns:
    the length of the sequence

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD