|
Orbital library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object orbital.util.QueuedSequenceIterator
public class QueuedSequenceIterator
A queued SequenceIterator represents the (mutable) logical concatenation of other iterators. It starts out with a list of iterators and reads from the first one until the end is reached, whereupon it reads from the second one, and so on, until the end is reached on the last of the contained iterators.
QueuedSequenceIterator is effectively a combination of SequenceIterator and QueuedIterator. It is introduced separately, since its construction is necessarily less performant than the unmodifiable version, SequenceIterator.
SequenceIterator
,
QueuedIterator
,
Serialized FormConstructor Summary | |
---|---|
QueuedSequenceIterator(java.util.Iterator iterators)
Create a new sequence iterator over an iterator of iterators. |
|
QueuedSequenceIterator(java.util.Iterator[] iterators)
Create a new sequence iterator over an array of iterators. |
|
QueuedSequenceIterator(java.util.List iterators)
Create a new sequence iterator over a list of iterators. |
Method Summary | |
---|---|
void |
add(int index,
java.lang.Object o)
Insert an iterator at the specified position into this queued sequence iterator. |
boolean |
add(java.lang.Object o)
Append an iterator to this queued sequence iterator. |
boolean |
hasNext()
|
java.lang.Object |
next()
|
void |
remove()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueuedSequenceIterator(java.util.Iterator iterators)
iterators
- is an iterator over iterators whose elements this SequenceIterator will provide,
one after one.public QueuedSequenceIterator(java.util.List iterators)
Note that modifying iterators will result in a ConcurrentModificationException at runtime, as per general contract of list iterators.
iterators
- is a list of iterators whose elements this SequenceIterator will provide,
one after one.public QueuedSequenceIterator(java.util.Iterator[] iterators)
iterators
- is an array of iterators whose elements this SequenceIterator will provide,
one after one.Method Detail |
---|
public boolean hasNext()
hasNext
in interface java.util.Iterator
public java.lang.Object next()
next
in interface java.util.Iterator
public void remove()
remove
in interface java.util.Iterator
public boolean add(java.lang.Object o)
public void add(int index, java.lang.Object o)
|
Orbital library 1.3.0: 11 Apr 2009 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |