org.jomc.util
Class WeakIdentityHashMap.EntryIterator

Package class diagram package WeakIdentityHashMap.EntryIterator
java.lang.Object
  extended by org.jomc.util.WeakIdentityHashMap.EntryIterator
All Implemented Interfaces:
Iterator
Enclosing class:
WeakIdentityHashMap

private class WeakIdentityHashMap.EntryIterator
extends Object
implements Iterator

An iterator over the hash-table backing the implementation.


Field Summary
private  WeakIdentityHashMap.Entry current
          The current element in the iteration.
private  int index
          The current index into the hash-table.
private  int modifications
          The number of modifications when this iterator got created.
private  WeakIdentityHashMap.Entry next
          The next element in the iteration.
 
Constructor Summary
WeakIdentityHashMap.EntryIterator()
          Creates a new EntryIterator instance.
 
Method Summary
 boolean hasNext()
          Gets a flag indicating that the iteration has more elements.
 Object next()
          Gets the next element in the iteration.
 void remove()
          Removes from the underlying hash-table the last element returned by the iterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

next

private WeakIdentityHashMap.Entry next
The next element in the iteration.


current

private WeakIdentityHashMap.Entry current
The current element in the iteration.


index

private int index
The current index into the hash-table.


modifications

private int modifications
The number of modifications when this iterator got created.

Constructor Detail

WeakIdentityHashMap.EntryIterator

WeakIdentityHashMap.EntryIterator()
Creates a new EntryIterator instance.

Method Detail

hasNext

public boolean hasNext()
Gets a flag indicating that the iteration has more elements.

Specified by:
hasNext in interface Iterator
Returns:
true if the iterator has more elements; false if the iterator does not have more elements.

next

public Object next()
Gets the next element in the iteration.

Specified by:
next in interface Iterator
Returns:
the next element in the iteration.
Throws:
NoSuchElementException - if the iterator does not have more elements.

remove

public void remove()
Removes from the underlying hash-table the last element returned by the iterator.

Specified by:
remove in interface Iterator
Throws:
IllegalStateException - if the next method has not yet been called, or the remove method has already been called after the last call to the next method.


Copyright © 2005-2009 The JOMC Project. All Rights Reserved.