Package org.apache.sis.internal.util
Class AbstractMap.KeyIterator
java.lang.Object
org.apache.sis.internal.util.AbstractMap.EntryIterator<K,V>
org.apache.sis.internal.util.AbstractMap.KeyIterator
- Enclosing class:
- AbstractMap<K,
V>
Convenience
EntryIterator
implementation which iterates over a list of key candidates.
All keys associated to a null value will be skipped.- Since:
- 0.8
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionKeyIterator
(K... keys) Creates a new iterator over the given key candidates. -
Method Summary
Methods inherited from class org.apache.sis.internal.util.AbstractMap.EntryIterator
getEntry, remove
-
Field Details
-
keys
The key candidates. -
index
private int indexIndex of current key. -
value
Value associated to current key.
-
-
Constructor Details
-
KeyIterator
Creates a new iterator over the given key candidates. The given array is not cloned; do not modify.- Parameters:
keys
- all keys that the map may possibly contain.
-
-
Method Details
-
next
protected boolean next()Moves to the next key associated to a non-null value.- Specified by:
next
in classAbstractMap.EntryIterator<K,
V> - Returns:
false
if this method reached iteration end.
-
getKey
Description copied from class:AbstractMap.EntryIterator
Returns the key at the current iterator position. This method is invoked only afterAbstractMap.EntryIterator.next()
.- Specified by:
getKey
in classAbstractMap.EntryIterator<K,
V> - Returns:
- the key at the current iterator position.
-
getValue
Description copied from class:AbstractMap.EntryIterator
Returns the value at the current iterator position. This method is invoked only afterAbstractMap.EntryIterator.next()
.- Specified by:
getValue
in classAbstractMap.EntryIterator<K,
V> - Returns:
- the value at the current iterator position.
-