public interface IntListIterator extends IntBidirectionalIterator, ListIterator<Integer>
ListIterator.
This interface merges the methods provided by a ListIterator and
a type-specific BidirectionalIterator. Moreover, it provides
type-specific versions of add()
and set().
ListIterator,
BidirectionalIteratorPrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong| Modifier and Type | Method and Description |
|---|---|
default void |
add(int k)
Inserts the specified element into the list (optional operation).
|
default void |
add(Integer k)
Deprecated.
Please use the corresponding type-specific method instead.
|
default Integer |
next()
Deprecated.
Please use the corresponding type-specific method instead.
|
default Integer |
previous()
Deprecated.
Please use the corresponding type-specific method instead.
|
default void |
remove()
Removes from the underlying collection the last element returned
by this iterator (optional operation).
|
default void |
set(int k)
Replaces the last element returned by
next() or
previous() with the specified element (optional operation). |
default void |
set(Integer k)
Deprecated.
Please use the corresponding type-specific method instead.
|
back, previousInt, skipforEachRemaining, nextIntforEachRemaininghasPrevioushasNext, hasPrevious, nextIndex, previousIndexdefault void set(int k)
next() or
previous() with the specified element (optional operation).k - the element used to replace the last element returned.
This default implementation just throws an UnsupportedOperationException.
ListIterator.set(Object)default void add(int k)
This default implementation just throws an UnsupportedOperationException.
k - the element to insert.ListIterator.add(Object)default void remove()
This default implementation just throws an UnsupportedOperationException.
remove in interface Iterator<Integer>remove in interface ListIterator<Integer>ListIterator.remove()@Deprecated default void set(Integer k)
set in interface ListIterator<Integer>@Deprecated default void add(Integer k)
add in interface ListIterator<Integer>@Deprecated default Integer next()
next in interface IntIteratornext in interface Iterator<Integer>next in interface ListIterator<Integer>next in interface PrimitiveIterator.OfInt@Deprecated default Integer previous()
previous in interface BidirectionalIterator<Integer>previous in interface IntBidirectionalIteratorprevious in interface ListIterator<Integer>ListIterator.previous()Copyright © 2020. All rights reserved.