Package org.apache.sis.internal.util
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>
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIteratorAdapter(Map<K, V> map) Creates a new adapter initialized to the entry iterator of the given map. -
Method Summary
Methods inherited from class org.apache.sis.internal.util.AbstractMap.EntryIterator
getEntry, remove
-
Field Details
-
Constructor Details
-
IteratorAdapter
Creates a new adapter initialized to the entry iterator of the given map.- Parameters:
map- the map from which to return entries.
-
-
Method Details
-
next
protected boolean next()Moves to the next entry having a non-null value. If this method returnstrue, then theentryandvaluefields are set to the properties of the new current entry. Otherwise (if this method returnsfalse) theentryandvaluefields are undetermined.- Specified by:
nextin classAbstractMap.EntryIterator<K,V> - Returns:
falseif this method reached iteration end.
-
getKey
Returnsentry.getKey()}.- Specified by:
getKeyin classAbstractMap.EntryIterator<K,V> - Returns:
- the key at the current iterator position.
-
getValue
- Specified by:
getValuein classAbstractMap.EntryIterator<K,V> - Returns:
- the value at the current iterator position.
-