Mobios v0.91

mobios.type
Class Sequence

java.lang.Object
  extended by mobios.type.Sequence
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DNA, Peptide, RNA

public abstract class Sequence
extends Object
implements Serializable

A compact representation of sequences of small alphabets whose indices fit within a valid byte range. The general contract of Sequence implementations in this package is that all instances be immutable. This class has constructors that make references to external objects in instances. It is the responsibility of the user to ensure that the external objects are immutable!

Version:
2003.06.05
Author:
Jack, Neha, Rui Mao, Weijia Xu, Willard
See Also:
Serialized Form

Method Summary
abstract  Symbol get(int index)
           
abstract  Alphabet getAlphabet()
           
 String getSequenceID()
           
 int numFragments(int fragmentLength)
          The number of fragments a given Sequence can be divided up into.
 int size()
           
abstract  String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

size

public final int size()
Returns:
the size of the Sequence.

numFragments

public int numFragments(int fragmentLength)
The number of fragments a given Sequence can be divided up into.

Parameters:
fragmentLength - the length of the fragments to split the Sequence into
Returns:
the number of fragments for the given Sequence

get

public abstract Symbol get(int index)
Parameters:
index - an integer index value
Returns:
the Symbol corresponding to that index.

toString

public abstract String toString()
Overrides:
toString in class Object

getAlphabet

public abstract Alphabet getAlphabet()
Returns:

getSequenceID

public String getSequenceID()

Mobios v0.91

(C) 2002 - 2006 The MoBIoS Group