Class MultipleValueMap.MultipleIterator

  • All Implemented Interfaces:
    java.util.Iterator
    Enclosing class:
    MultipleValueMap

    public class MultipleValueMap.MultipleIterator
    extends java.lang.Object
    implements java.util.Iterator
    Iterator for only the multiple-valued keys in the map.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Object m_currentKey
      Current key, null if past end.
      private boolean m_isConsumed
      Current key value has been consumed flag.
      private java.util.Iterator m_keyIterator
      Iterator through keys present in map.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected MultipleIterator()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void advance()
      Advance to next multiple-valued key in map.
      boolean hasNext()
      Check for another multiple-valued key present.
      java.lang.Object next()
      Get the next multiple-valued key in map.
      void remove()
      Remove current multiple-valued key.
      • 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 Detail

      • m_isConsumed

        private boolean m_isConsumed
        Current key value has been consumed flag.
      • m_currentKey

        private java.lang.Object m_currentKey
        Current key, null if past end.
      • m_keyIterator

        private java.util.Iterator m_keyIterator
        Iterator through keys present in map.
    • Constructor Detail

      • MultipleIterator

        protected MultipleIterator()
        Constructor. This initializes the key iterator and next key values.
    • Method Detail

      • advance

        private void advance()
        Advance to next multiple-valued key in map.
      • hasNext

        public boolean hasNext()
        Check for another multiple-valued key present.
        Specified by:
        hasNext in interface java.util.Iterator
        Returns:
        true if present, false if not
      • next

        public java.lang.Object next()
        Get the next multiple-valued key in map. This returns the current next key, advancing to the next next key.
        Specified by:
        next in interface java.util.Iterator
        Returns:
        next multiple-valued key
      • remove

        public void remove()
        Remove current multiple-valued key.
        Specified by:
        remove in interface java.util.Iterator