Class ObjectIterators.UnmodifiableListIterator<K>

java.lang.Object
it.unimi.dsi.fastutil.objects.ObjectIterators.UnmodifiableListIterator<K>
All Implemented Interfaces:
BidirectionalIterator<K>, ObjectBidirectionalIterator<K>, ObjectIterator<K>, ObjectListIterator<K>, java.util.Iterator<K>, java.util.ListIterator<K>
Enclosing class:
ObjectIterators

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>
      Returns:
      whether there is a previous element.
      See Also:
      ListIterator.hasPrevious()
    • 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>
      Returns:
      the previous element from the collection.
      See Also:
      ListIterator.previous()
    • 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>