Interface ObjectListIterator<K>

    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void add​(K k)
      Inserts the specified element into the list (optional operation).
      default void remove()
      Removes from the underlying collection the last element returned by this iterator (optional operation).
      default void set​(K k)
      Replaces the last element returned by Iterator.next() or BidirectionalIterator.previous() with the specified element (optional operation).
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
      • Methods inherited from interface java.util.ListIterator

        hasNext, hasPrevious, next, nextIndex, previous, previousIndex
    • Method Detail

      • set

        default void set​(K k)
        Replaces the last element returned by Iterator.next() or BidirectionalIterator.previous() with the specified element (optional operation).
        Specified by:
        set in interface java.util.ListIterator<K>
        Parameters:
        k - the element used to replace the last element returned.

        This default implementation just throws an UnsupportedOperationException.

        See Also:
        ListIterator.set(Object)
      • add

        default void add​(K k)
        Inserts the specified element into the list (optional operation).

        This default implementation just throws an UnsupportedOperationException.

        Specified by:
        add in interface java.util.ListIterator<K>
        Parameters:
        k - the element to insert.
        See Also:
        ListIterator.add(Object)
      • remove

        default void remove()
        Removes from the underlying collection the last element returned by this iterator (optional operation).

        This default implementation just throws an UnsupportedOperationException.

        Specified by:
        remove in interface java.util.Iterator<K>
        Specified by:
        remove in interface java.util.ListIterator<K>
        See Also:
        ListIterator.remove()