Class AbstractKeySetBasedMap.KeyIterator

  • All Implemented Interfaces:
    Enumeration<K>, Iterator<K>
    Enclosing class:
    AbstractKeySetBasedMap<K,​V>

    public class AbstractKeySetBasedMap.KeyIterator
    extends com.oracle.coherence.common.collections.AbstractStableIterator<K>
    An iterator over the keys from the internal key Set that implements element removal via the Map's removeBlind method.
    • Constructor Detail

      • KeyIterator

        protected KeyIterator​(Iterator<K> iter)
        Construct a KeyIterator.
        Parameters:
        iter - the underlying Iterator from the internal key Set
    • Method Detail

      • advance

        protected void advance()
        Advance to the next object.

        This method must be implemented by the concrete sub-class by calling AbstractStableIterator.setNext(T) if there is a next object.

        Specified by:
        advance in class com.oracle.coherence.common.collections.AbstractStableIterator<K>
      • remove

        protected void remove​(Object oPrev)
        Remove the specified item.

        This is an optional operation. If the Iterator supports element removal, then it should implement this method, which is delegated to by the AbstractStableIterator.remove() method.

        Overrides:
        remove in class com.oracle.coherence.common.collections.AbstractStableIterator<K>
        Parameters:
        oPrev - the previously iterated object that should be removed