Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.util
Class IdentityHashMap.IdentityIterator  view IdentityHashMap.IdentityIterator download IdentityHashMap.IdentityIterator.java

java.lang.Object
  extended byjava.util.IdentityHashMap.IdentityIterator
All Implemented Interfaces:
Iterator
Enclosing class:
IdentityHashMap

private class IdentityHashMap.IdentityIterator
extends java.lang.Object
implements Iterator

This class allows parameterized iteration over IdentityHashMaps. Based on its construction, it returns the key or value of a mapping, or creates the appropriate Map.Entry object with the correct fail-fast semantics and identity comparisons.


Field Summary
(package private)  int count
          The number of elements remaining to be returned by next().
(package private)  int knownMod
          The number of modifications to the backing Map that we know about.
(package private)  int loc
          Location in the table.
(package private)  int type
          The type of this Iterator: AbstractMap.KEYS 55 , AbstractMap.VALUES 55 , or AbstractMap.ENTRIES 55 .
 
Constructor Summary
(package private) IdentityHashMap.IdentityIterator(int type)
          Construct a new Iterator with the supplied type.
 
Method Summary
 boolean hasNext()
          Returns true if the Iterator has more elements.
 java.lang.Object next()
          Returns the next element in the Iterator's sequential view.
 void remove()
          Removes from the backing Map the last element which was fetched with the next() method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

final int type
The type of this Iterator: AbstractMap.KEYS 55 , AbstractMap.VALUES 55 , or AbstractMap.ENTRIES 55 .


knownMod

int knownMod
The number of modifications to the backing Map that we know about.


count

int count
The number of elements remaining to be returned by next().


loc

int loc
Location in the table.

Constructor Detail

IdentityHashMap.IdentityIterator

IdentityHashMap.IdentityIterator(int type)
Construct a new Iterator with the supplied type.

Method Detail

hasNext

public boolean hasNext()
Returns true if the Iterator has more elements.

Specified by:
hasNext in interface Iterator

next

public java.lang.Object next()
Returns the next element in the Iterator's sequential view.

Specified by:
next in interface Iterator

remove

public void remove()
Removes from the backing Map the last element which was fetched with the next() method.

Specified by:
remove in interface Iterator