uk.ac.man.bioinf.sequence
Class DefaultSequence

java.lang.Object
  |
  +--uk.ac.man.bioinf.sequence.AbstractSequence
        |
        +--uk.ac.man.bioinf.sequence.DefaultSequence
All Implemented Interfaces:
Identifiable, Sequence

public class DefaultSequence
extends AbstractSequence

DefaultSequence.java Created: Thu Mar 2 15:32:25 2000

Version:
$Id: DefaultSequence.java,v 1.8 2001/04/11 17:04:43 lord Exp $
Author:
Phillip Lord

Constructor Summary
DefaultSequence(Element[] elements, SequenceType type)
           
DefaultSequence(Element[] elements, SequenceType type, Identifier ident)
           
DefaultSequence(Sequence seq)
           
DefaultSequence(Sequence seq, SequenceType type)
           
 
Method Summary
 Element getElementAt(int index)
          Returns an element at a given location.
 Identifier getIdentifier()
           
 int getLength()
          Returns the length of the sequence.
 Element[] getSequenceAsElements()
          Returns the sequence as an array of elements.
 
Methods inherited from class uk.ac.man.bioinf.sequence.AbstractSequence
checkRange, checkSequenceType, checkSequenceType, getElementAtAsChar, getSequenceAsChars, getSequenceIndexException, getSequenceType, getSequenceTypeException, getSubSequence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSequence

public DefaultSequence(Element[] elements,
                       SequenceType type,
                       Identifier ident)

DefaultSequence

public DefaultSequence(Element[] elements,
                       SequenceType type)

DefaultSequence

public DefaultSequence(Sequence seq,
                       SequenceType type)

DefaultSequence

public DefaultSequence(Sequence seq)
Method Detail

getIdentifier

public Identifier getIdentifier()

getLength

public int getLength()
Description copied from interface: Sequence
Returns the length of the sequence.

Returns:
the length of the sequence

getElementAt

public Element getElementAt(int index)
Description copied from interface: Sequence
Returns an element at a given location.

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

getSequenceAsElements

public Element[] getSequenceAsElements()
Description copied from interface: Sequence
Returns the sequence as an array of elements.

Returns:
the sequence