|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--xxl.cursors.Merger
A Merger-object serializes inputs with respect to a given comparator.
| Field Summary | |
protected Cursor[] |
cursors
|
protected Cursor |
minCursor
|
protected Queue |
queue
The queue used to merge inputs. |
| Constructor Summary | |
Merger(java.util.Iterator[] iterators)
Creates a new Merger. |
|
Merger(java.util.Iterator[] iterators,
java.util.Comparator comparator)
Creates a new Merger. |
|
Merger(java.util.Iterator[] iterators,
Queue queue)
Creates a new Merger. |
|
Merger(java.util.Iterator iterator0,
java.util.Iterator iterator1)
Creates a new Merger for two input-iterators. |
|
Merger(java.util.Iterator iterator0,
java.util.Iterator iterator1,
java.util.Comparator comparator)
Creates a new Merger for two input-iterators. |
|
Merger(java.util.Iterator iterator0,
java.util.Iterator iterator1,
Queue queue)
Creates a new Merger for two input-iterators. |
|
| Method Summary | |
void |
close()
Closes the Cursor. |
boolean |
hasNext()
Returns true if the iteration has more elements. |
java.lang.Object |
next()
Returns the next element in the iteration. |
java.lang.Object |
peek()
Shows the next element in the iteration without removing it. |
void |
remove()
Removes from the underlying collection the last element returned by the iterator (optional operation). |
void |
reset()
Resets the Cursor to its initial state. |
boolean |
supportsPeek()
Returns true if the peek operation is supported by this PeekIterator (Always returns true). |
void |
update(java.lang.Object object)
Replaces the object that was returned by the last call to next() or peek(). |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected Queue queue
protected Cursor minCursor
protected Cursor[] cursors
| Constructor Detail |
public Merger(java.util.Iterator[] iterators,
Queue queue)
iterators - input-iterators to be mergedqueue - Queue used for merging
public Merger(java.util.Iterator[] iterators,
java.util.Comparator comparator)
iterators - input-iterators to be mergedcomparator - Comparator used to create the queue for mergingpublic Merger(java.util.Iterator[] iterators)
iterators - the Iterator pointing to the input-iterators
public Merger(java.util.Iterator iterator0,
java.util.Iterator iterator1,
Queue queue)
iterator0 - input-iterator 0iterator0 - input-iterator 1queue - the Queue used for merging
public Merger(java.util.Iterator iterator0,
java.util.Iterator iterator1,
java.util.Comparator comparator)
iterator0 - input-iterator 0iterator0 - input-iterator 1comparator - the Comparator used to create the Heap for merging
public Merger(java.util.Iterator iterator0,
java.util.Iterator iterator1)
iterator0 - input-iterator 0iterator0 - input-iterator 1| Method Detail |
public void close()
public boolean hasNext()
public java.lang.Object next()
throws java.util.NoSuchElementException
public java.lang.Object peek()
throws java.util.NoSuchElementException
public void remove()
throws java.lang.UnsupportedOperationException,
java.lang.IllegalStateException
public void reset()
throws java.lang.UnsupportedOperationException
public boolean supportsPeek()
public void update(java.lang.Object object)
throws java.lang.UnsupportedOperationException
object - the object that replaces the object returned
by the last call to next() or peek()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||