Class DoubleOrderedMap.DoubleOrderedMapIterator

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

    private abstract class DoubleOrderedMap.DoubleOrderedMapIterator
    extends java.lang.Object
    implements java.util.Iterator
    • Constructor Detail

      • DoubleOrderedMapIterator

        DoubleOrderedMapIterator​(int type)
        Constructor
        Parameters:
        type -
    • Method Detail

      • doGetNext

        protected abstract java.lang.Object doGetNext()
        Returns:
        'next', whatever that means for a given kind of DoubleOrderedMapIterator
      • hasNext

        public final boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator
        Returns:
        true if the iterator has more elements.
      • next

        public final java.lang.Object next()
                                    throws java.util.NoSuchElementException,
                                           java.util.ConcurrentModificationException
        Specified by:
        next in interface java.util.Iterator
        Returns:
        the next element in the iteration.
        Throws:
        java.util.NoSuchElementException - if iteration has no more elements.
        java.util.ConcurrentModificationException - if the DoubleOrderedMap is modified behind the iterator's back
      • remove

        public final void remove()
                          throws java.lang.IllegalStateException,
                                 java.util.ConcurrentModificationException
        Removes from the underlying collection the last element returned by the iterator. This method can be called only once per call to next. The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method.
        Specified by:
        remove in interface java.util.Iterator
        Throws:
        java.lang.IllegalStateException - if the next method has not yet been called, or the remove method has already been called after the last call to the next method.
        java.util.ConcurrentModificationException - if the DoubleOrderedMap is modified behind the iterator's back