net.sourceforge.jabm.util
Class QueueDisassembler

java.lang.Object
  extended by net.sourceforge.jabm.util.QueueDisassembler
All Implemented Interfaces:
java.util.Iterator

public class QueueDisassembler
extends java.lang.Object
implements java.util.Iterator

An iterator that destructively iterates over a PriorityQueue, that is each item that is returned is removed from the top of the heap.

 

Constructor Summary
QueueDisassembler(PriorityQueue queue)
           
 
Method Summary
 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

QueueDisassembler

public QueueDisassembler(PriorityQueue queue)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

remove

public void remove()
Specified by:
remove in interface java.util.Iterator