inf.util
Class ArrayOfListsIntPriorityQueue.ArrayOfListsIntPriorityQueueIterator<T>

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

 class ArrayOfListsIntPriorityQueue.ArrayOfListsIntPriorityQueueIterator<T>
extends java.lang.Object
implements java.util.Iterator<E>

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


Field Summary
(package private)  int currentArrayList
          the index pointing to the current list in the array
(package private)  java.util.Iterator<E> listElts
          the iterator for the elements in the current list
(package private)  java.util.Iterator<IntKeyTreeMap.IntKeyTreeEntry<java.util.LinkedList<E>>> treeElts
          the iterator for the elements in the tree
 
Constructor Summary
ArrayOfListsIntPriorityQueue.ArrayOfListsIntPriorityQueueIterator()
           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

currentArrayList

int currentArrayList
the index pointing to the current list in the array


treeElts

java.util.Iterator<IntKeyTreeMap.IntKeyTreeEntry<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

ArrayOfListsIntPriorityQueue.ArrayOfListsIntPriorityQueueIterator

ArrayOfListsIntPriorityQueue.ArrayOfListsIntPriorityQueueIterator()

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>