Map.Entry

†††††††††

■ An inner class Interface of Map that represents the sets of key-value pairs s returned as a (non-Map) Set by map.entrySet( )

 

■ Then you use an iterator against it.No ListIterator however, as thatís not for Sets.

 

■ Has several of its own methods (besides the ones youíd get from the Iterator, to navigate the Set):

.getKey( ) and .getValue( ) return returns the current itemís key and value, respectively

.setValue(Obj) replaces the current value and also writes through to the underlying Map.

 

■ Note if the iteratorís remove( ) method has been run you canít use the above methods predictably.