Class AbstractMap.IteratorAdapter<K,V>

java.lang.Object
org.apache.sis.internal.util.AbstractMap.EntryIterator<K,V>
org.apache.sis.internal.util.AbstractMap.IteratorAdapter<K,V>
Type Parameters:
K - the type of keys maintained by the map.
V - the type of mapped values.
Enclosing class:
AbstractMap<K,V>

protected static class AbstractMap.IteratorAdapter<K,V> extends AbstractMap.EntryIterator<K,V>
An implementation of AbstractMap.EntryIterator which delegates its work to a standard iterator. Subclasses can modify the value or other properties during iteration.

This method does not implement the AbstractMap.EntryIterator.remove() method, thus assuming an unmodifiable map (which is consistent with the default implementation of AbstractMap methods). Modifiable maps should override remove() themselves.

See Also:
  • Field Details

    • it

      protected Iterator<Map.Entry<K,V>> it
      The standard iterator on which to delegate the work. It is safe to change this value before to invoke next().
    • entry

      protected Map.Entry<K,V> entry
      The entry found by the last call to next().
    • value

      protected V value
      The value of Map.entry(K, V).getValue()}. It is safe to change this value after next() invocation.
  • Constructor Details

    • IteratorAdapter

      public IteratorAdapter(Map<K,V> map)
      Creates a new adapter initialized to the entry iterator of the given map.
      Parameters:
      map - the map from which to return entries.
  • Method Details