inf.util
Class TreeOfListsDoublePriorityQueue.TreeOfListsDoublePriorityQueueIterator<T>

java.lang.Object
  extended by inf.util.TreeOfListsDoublePriorityQueue.TreeOfListsDoublePriorityQueueIterator<T>
All Implemented Interfaces:
java.util.Iterator<E>
Enclosing class:
TreeOfListsDoublePriorityQueue<E>

 class TreeOfListsDoublePriorityQueue.TreeOfListsDoublePriorityQueueIterator<T>
extends java.lang.Object
implements java.util.Iterator<E>

This class represents an iterator for the elements in an TreeOfListsDoublePriorityQueue. Elements will be enumerated in order!


Field Summary
(package private)  java.util.Iterator<E> listElts
          the iterator for the elements in the current list *
(package private)  java.util.Iterator<DoubleKeyTreeMap.DoubleKeyTreeEntry<java.util.LinkedList<E>>> treeElts
          the iterator for the elements in the tree *
 
Constructor Summary
TreeOfListsDoublePriorityQueue.TreeOfListsDoublePriorityQueueIterator()
           This constructor initializes an Iterator of the elements in the given priority queue.
 
Method Summary
 boolean hasNext()
           This function tests whether there are more elements to be enumerated.
 E next()
           This function retrieves the next element in this Iterator.
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

treeElts

java.util.Iterator<DoubleKeyTreeMap.DoubleKeyTreeEntry<java.util.LinkedList<E>>> treeElts
the iterator for the elements in the tree *


listElts

java.util.Iterator<E> listElts
the iterator for the elements in the current list *

Constructor Detail

TreeOfListsDoublePriorityQueue.TreeOfListsDoublePriorityQueueIterator

TreeOfListsDoublePriorityQueue.TreeOfListsDoublePriorityQueueIterator()

This constructor initializes an Iterator of the elements in the given priority queue.

Method Detail

hasNext

public boolean hasNext()

This function tests whether there are more elements to be enumerated.

Specified by:
hasNext in interface java.util.Iterator<E>
Returns:
true if and only if there are more elements

next

public E next()
       throws java.util.NoSuchElementException

This function retrieves the next element in this Iterator.

Specified by:
next in interface java.util.Iterator<E>
Returns:
the next element
Throws:
java.util.NoSuchElementException - is thrown iff there are no more elements

remove

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