Class ObjectIterators.UnmodifiableListIterator<K>

All Implemented Interfaces:
BidirectionalIterator<K>, ObjectBidirectionalIterator<K>, ObjectIterator<K>, ObjectListIterator<K>, java.util.Iterator<K>, java.util.ListIterator<K>
Enclosing class:

public static class ObjectIterators.UnmodifiableListIterator<K>
extends java.lang.Object
implements ObjectListIterator<K>
An unmodifiable wrapper class for list iterators.
  • Constructor Details

    • UnmodifiableListIterator

      public UnmodifiableListIterator​(ObjectListIterator<? extends K> i)
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface java.util.Iterator<K>
      Specified by:
      hasNext in interface java.util.ListIterator<K>
    • hasPrevious

      public boolean hasPrevious()
      Description copied from interface: BidirectionalIterator
      Returns whether there is a previous element.
      Specified by:
      hasPrevious in interface BidirectionalIterator<K>
      Specified by:
      hasPrevious in interface java.util.ListIterator<K>
      whether there is a previous element.
      See Also:
    • next

      public K next()
      Specified by:
      next in interface java.util.Iterator<K>
      Specified by:
      next in interface java.util.ListIterator<K>
    • previous

      public K previous()
      Description copied from interface: BidirectionalIterator
      Returns the previous element from the collection.
      Specified by:
      previous in interface BidirectionalIterator<K>
      Specified by:
      previous in interface java.util.ListIterator<K>
      the previous element from the collection.
      See Also:
    • nextIndex

      public int nextIndex()
      Specified by:
      nextIndex in interface java.util.ListIterator<K>
    • previousIndex

      public int previousIndex()
      Specified by:
      previousIndex in interface java.util.ListIterator<K>
    • forEachRemaining

      public void forEachRemaining​(java.util.function.Consumer<? super K> action)
      Specified by:
      forEachRemaining in interface java.util.Iterator<K>