|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjbil.sequence.Sequence
public abstract class Sequence
Abstract class representing a sequence of symbols from a fixed alphabet. A sequence can be associated to a name.
Constructor Summary | |
---|---|
Sequence()
|
Method Summary | |
---|---|
abstract void |
append(Sequence sequence)
Appends a sequence to this sequence. |
abstract void |
append(Symbol symbol)
Appends a symbol to this sequence. |
abstract Sequence |
clone()
|
abstract void |
delete(int beginIndex,
int endIndex)
Deletes a subsequence of this sequence. |
boolean |
endsWith(Sequence subSequence)
Checks if this sequence ends with a given suffix. |
abstract Alphabet |
getAlphabet()
|
java.lang.String |
getName()
|
int |
indexAt(int index)
Gets the position in the base alphabet of the symbol at a given position in the sequence. |
abstract void |
insert(int index,
Sequence sequence)
Inserts a sequence at a given position in this sequence. |
abstract void |
insert(int index,
Symbol symbol)
Inserts a new symbol at a given position in this sequence. |
abstract int |
length()
|
boolean |
occursAt(Sequence subSequence,
int beginIndex)
Checks if a sequence occurs at a specified position of this sequence. |
abstract void |
prepend(Sequence sequence)
Prepends a sequence to this sequence. |
abstract void |
prepend(Symbol symbol)
Prepends a symbol to this sequence. |
void |
setName(java.lang.String name)
Sets the name of the sequence. |
abstract void |
setSymbolAt(int index,
Symbol symbol)
Sets the symbol at a given position in this sequence. |
boolean |
startsWith(Sequence subSequence)
Checks if this sequence begins with a given prefix. |
abstract Sequence |
subSequence(int beginIndex)
Gets a new sequence that is a suffix of this sequence. |
abstract Sequence |
subSequence(int beginIndex,
int endIndex)
Gets a new sequence that is a subsequence of this sequence. |
abstract Symbol |
symbolAt(int index)
Gets the symbol at a given position in the sequence. |
java.lang.String |
toString()
|
abstract java.lang.String |
toString(int beginIndex,
int endIndex)
Returns the srting representation of a subsequence of this sequence. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Sequence()
Method Detail |
---|
public java.lang.String getName()
public void setName(java.lang.String name)
public abstract Alphabet getAlphabet()
public abstract Sequence clone()
clone
in class java.lang.Object
public abstract int length()
public abstract Symbol symbolAt(int index)
index
- A position in the sequence.
public int indexAt(int index)
index
- A position in the sequence.
public abstract void setSymbolAt(int index, Symbol symbol)
index
- The position to be set.symbol
- The new symbol.public abstract Sequence subSequence(int beginIndex)
beginIndex
- The start position of the suffix.
public abstract Sequence subSequence(int beginIndex, int endIndex)
beginIndex
- The start position of the subsequence.endIndex
- The end position of the subsequence.
public abstract void append(Symbol symbol)
symbol
- The symbol to be appended.public abstract void append(Sequence sequence)
sequence
- The sequence to be appended.public abstract void prepend(Symbol symbol)
symbol
- The symbol to be prepended.public abstract void prepend(Sequence sequence)
sequence
- The sequence to be prepended.public abstract void insert(int index, Symbol symbol)
index
- The position at which the symbol is inserted.symbol
- The symbol to be inserted.public abstract void insert(int index, Sequence sequence)
index
- The position at which the sequence is inserted.sequence
- The sequence to be inserted.public abstract void delete(int beginIndex, int endIndex)
beginIndex
- The start position of the subsequence to be deleted.endIndex
- The end position (not inclusive) of the subsequence to be deleted.public boolean occursAt(Sequence subSequence, int beginIndex)
subSequence
- The subsequence.beginIndex
- The start position of the match.
public boolean startsWith(Sequence subSequence)
subSequence
- The prefix.
public boolean endsWith(Sequence subSequence)
subSequence
- The suffix.
public java.lang.String toString()
toString
in class java.lang.Object
public abstract java.lang.String toString(int beginIndex, int endIndex)
beginIndex
- The start position of the subsequence.endIndex
- The end position of the subsequence.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |