|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.abstracthorizon.mercury.imap.util.ComposedSequence
public class ComposedSequence
Composed sequence - an ordered sequence of sequences.
Field Summary | |
---|---|
protected int |
ptr
Current pointer |
protected List<Sequence> |
sequences
Sequences |
Constructor Summary | |
---|---|
ComposedSequence()
Constructor |
Method Summary | |
---|---|
void |
add(Sequence s)
Adds new sequence to composed sequence |
void |
clear()
Clears list of sequences |
int |
compareTo(Sequence other)
Compares two sequences returning -1, 0 or 1 |
boolean |
contains(Sequence s)
Returns true if sequence exists |
void |
first()
Sets pointer to first element in sequences |
int |
getMax()
Returns maximum number from the sequence |
int |
getMin()
Returns minimum number from the sequence |
Iterator<Sequence> |
getSequencesAsIterator()
Returns sequences list iterator |
boolean |
more()
Returns true if there are more elements in the sequence |
int |
next()
Returns next element from the sequence |
void |
remove(Sequence s)
Removes sequence from list of sequences |
void |
setLowerLimit(int lower)
Sets the lower limit in the sequence removing subsequences below that point |
void |
setUpperLimit(int upper)
Sets the upper limit in the sequence removing subsequences above that point |
String |
toString()
Creates a string representing all sequences |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected List<Sequence> sequences
protected int ptr
Constructor Detail |
---|
public ComposedSequence()
Method Detail |
---|
public void add(Sequence s)
s
- sequence to be addedpublic void remove(Sequence s)
s
- sequence to be removedpublic void clear()
public boolean contains(Sequence s)
true
if sequence exists
s
- sequence
true
if sequence existspublic int getMin()
getMin
in interface Sequence
public int getMax()
getMax
in interface Sequence
public void setLowerLimit(int lower)
setLowerLimit
in interface Sequence
lower
- lower limitpublic void setUpperLimit(int upper)
setUpperLimit
in interface Sequence
lower
- upper limitpublic void first()
first
in interface Sequence
public boolean more()
true
if there are more elements in the sequence
more
in interface Sequence
true
if there are more elements in the sequencepublic int next()
next
in interface Sequence
public Iterator<Sequence> getSequencesAsIterator()
public String toString()
toString
in class Object
public int compareTo(Sequence other)
compareTo
in interface Comparable<Sequence>
other
- other sequence
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |