Package org.apache.commons.collections4.bidimap

# Class AbstractDualBidiMap.KeySetIterator<K>

java.lang.Object
org.apache.commons.collections4.iterators.AbstractUntypedIteratorDecorator<K,K>
org.apache.commons.collections4.iterators.AbstractIteratorDecorator<K>
org.apache.commons.collections4.bidimap.AbstractDualBidiMap.KeySetIterator<K>

Type Parameters:
  `K` - the key type.

All Implemented Interfaces:
  `Iterator<K>`

Enclosing class:
  `AbstractDualBidiMap<K,V>`

protected static class AbstractDualBidiMap.KeySetIterator<K> extends AbstractIteratorDecorator<K>
Inner class KeySetIterator.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected boolean`
  `canRemove`
  Whether remove is allowed at present
  `protected K`
  `lastKey`
  The last returned key
  `protected final AbstractDualBidiMap<K,?>`
  `parent`
  The parent map

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `KeySetIterator(Iterator<K> iterator, AbstractDualBidiMap<K,?> parent)`
  Constructs a new instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `K`
  `next()`
  `void`
  `remove()`

  ### Methods inherited from class org.apache.commons.collections4.iterators.AbstractUntypedIteratorDecorator

  `getIterator, hasNext`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface java.util.Iterator

  `forEachRemaining`

- ## Field Details

  - ### parent

    protected final AbstractDualBidiMap<K,?> parent
    The parent map

  - ### lastKey

    protected K lastKey
    The last returned key

  - ### canRemove

    protected boolean canRemove
    Whether remove is allowed at present

- ## Constructor Details

  - ### KeySetIterator

    protected KeySetIterator(Iterator<K> iterator, AbstractDualBidiMap<K,?> parent)
    Constructs a new instance.
    Parameters:
      `iterator` - the iterator to decorate
      `parent` - the parent map

- ## Method Details

  - ### next

    public K next()
    Description copied from class: `AbstractIteratorDecorator`
    Specified by:
      `next` in interface `Iterator<K>`
    Overrides:
      `next` in class `AbstractIteratorDecorator<K>`

  - ### remove

    public void remove()
    Specified by:
      `remove` in interface `Iterator<K>`
    Overrides:
      `remove` in class `AbstractUntypedIteratorDecorator<K,K>`