Class TreeBidiMap.ViewIterator

    • Constructor Summary

      Constructors 
      Constructor Description
      ViewIterator​(TreeBidiMap main, int orderType, int dataType)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.Object doGetData()
      Gets the data value for the lastReturnedNode field.
      boolean hasNext()  
      boolean hasPrevious()
      Checks to see if there is a previous element that can be iterated to.
      java.lang.Object next()  
      java.lang.Object previous()
      Gets the previous element from the collection.
      void remove()  
      • 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

      • main

        protected final TreeBidiMap main
        The parent map.
      • orderType

        protected final int orderType
        Whether to return KEY or VALUE order.
      • dataType

        protected final int dataType
        Whether to return KEY, VALUE, MAPENTRY or INVERSEMAPENTRY data.
      • lastReturnedNode

        protected TreeBidiMap.Node lastReturnedNode
        The last node returned by the iterator.
      • nextNode

        protected TreeBidiMap.Node nextNode
        The next node to be returned by the iterator.
      • previousNode

        protected TreeBidiMap.Node previousNode
        The previous node in the sequence returned by the iterator.
      • expectedModifications

        private int expectedModifications
        The modification count.
    • Constructor Detail

      • ViewIterator

        ViewIterator​(TreeBidiMap main,
                     int orderType,
                     int dataType)
        Constructor.
        Parameters:
        main - the main map
        orderType - the KEY or VALUE int for the order
        dataType - the KEY, VALUE, MAPENTRY or INVERSEMAPENTRY int
    • Method Detail

      • hasNext

        public final boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator
      • next

        public final java.lang.Object next()
        Specified by:
        next in interface java.util.Iterator
      • hasPrevious

        public boolean hasPrevious()
        Description copied from interface: OrderedIterator
        Checks to see if there is a previous element that can be iterated to.
        Specified by:
        hasPrevious in interface OrderedIterator
        Returns:
        true if the iterator has a previous element
      • previous

        public java.lang.Object previous()
        Description copied from interface: OrderedIterator
        Gets the previous element from the collection.
        Specified by:
        previous in interface OrderedIterator
        Returns:
        the previous element in the iteration
      • doGetData

        protected java.lang.Object doGetData()
        Gets the data value for the lastReturnedNode field.
        Returns:
        the data value
      • remove

        public final void remove()
        Specified by:
        remove in interface java.util.Iterator