|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.ac.man.bioinf.sequence.AbstractSequence
AbstractSequence.java Provides some of the methods for sequence. It assumes that the sequence is stored internally as a list of Residues and does all the mapping into chars. Created: Thu Mar 2 16:10:51 2000
Constructor Summary | |
AbstractSequence(SequenceType type)
|
Method Summary | |
protected void |
checkRange(int index)
|
protected void |
checkSequenceType(Element element)
|
protected void |
checkSequenceType(Element[] elements)
Check if all these elements are of a valid type |
char |
getElementAtAsChar(int index)
Returns the character of an target element. |
char[] |
getSequenceAsChars()
Returns the sequence as an array of characters. |
protected NoSuchSequenceElementException |
getSequenceIndexException(int index)
|
SequenceType |
getSequenceType()
Returns the type of sequence. |
protected InvalidSequenceTypeException |
getSequenceTypeException(Element element)
|
Sequence |
getSubSequence(int position,
int length)
Returns a sub-sequence from the current sequence. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface uk.ac.man.bioinf.sequence.Sequence |
getElementAt, getLength, getSequenceAsElements |
Methods inherited from interface uk.ac.man.bioinf.sequence.identifier.Identifiable |
getIdentifier |
Constructor Detail |
public AbstractSequence(SequenceType type)
Method Detail |
public SequenceType getSequenceType()
Sequence
getSequenceType
in interface Sequence
public Sequence getSubSequence(int position, int length)
Sequence
getSubSequence
in interface Sequence
position
- the initial index of the sub-sequence
public char[] getSequenceAsChars()
Sequence
getSequenceAsChars
in interface Sequence
public char getElementAtAsChar(int index)
Sequence
getElementAtAsChar
in interface Sequence
index
- the location of the target element
protected void checkSequenceType(Element[] elements) throws InvalidSequenceTypeException
elements
- the elements
InvalidSequenceTypeException
- if an element is not of a
valid typeprotected InvalidSequenceTypeException getSequenceTypeException(Element element)
protected void checkSequenceType(Element element) throws InvalidSequenceTypeException
InvalidSequenceTypeException
protected NoSuchSequenceElementException getSequenceIndexException(int index)
protected void checkRange(int index)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |