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>

protected final class AbstractMap.KeyIterator extends AbstractMap.EntryIterator<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
    Modifier and Type
    Field
    Description
    private int
    Index of current key.
    private final K[]
    The key candidates.
    private V
    Value associated to current key.
  • Constructor Summary

    Constructors
    Constructor
    Description
    KeyIterator(K... keys)
    Creates a new iterator over the given key candidates.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected K
    Returns the key at the current iterator position.
    protected V
    Returns the value at the current iterator position.
    protected boolean
    Moves to the next key associated to a non-null value.

    Methods inherited from class org.apache.sis.internal.util.AbstractMap.EntryIterator

    getEntry, remove

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • keys

      private final K[] keys
      The key candidates.
    • index

      private int index
      Index of current key.
    • value

      private V value
      Value associated to current key.
  • Constructor Details

    • KeyIterator

      @SafeVarargs public KeyIterator(K... keys)
      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