Package it.unimi.dsi.fastutil.ints
Interface IntListIterator
-
- All Superinterfaces:
BidirectionalIterator<Integer>
,IntBidirectionalIterator
,IntIterator
,Iterator<Integer>
,ListIterator<Integer>
,ObjectBidirectionalIterator<Integer>
,ObjectIterator<Integer>
,PrimitiveIterator<Integer,IntConsumer>
,PrimitiveIterator.OfInt
- All Known Implementing Classes:
AbstractIntListIterator
,IntIterators.EmptyIterator
,IntIterators.UnmodifiableListIterator
public interface IntListIterator extends IntBidirectionalIterator, ListIterator<Integer>
A type-specific bidirectional iterator that is also aListIterator
.This interface merges the methods provided by a
ListIterator
and a type-specificBidirectionalIterator
. Moreover, it provides type-specific versions ofadd()
andset()
.- See Also:
ListIterator
,BidirectionalIterator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface java.util.PrimitiveIterator
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong
-
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method 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 bynext()
orprevious()
with the specified element (optional operation).default void
set(Integer k)
Deprecated.Please use the corresponding type-specific method instead.-
Methods inherited from interface it.unimi.dsi.fastutil.BidirectionalIterator
hasPrevious
-
Methods inherited from interface it.unimi.dsi.fastutil.ints.IntBidirectionalIterator
back, previousInt, skip
-
Methods inherited from interface it.unimi.dsi.fastutil.ints.IntIterator
forEachRemaining, nextInt
-
Methods inherited from interface java.util.ListIterator
hasNext, hasPrevious, nextIndex, previousIndex
-
Methods inherited from interface java.util.PrimitiveIterator.OfInt
forEachRemaining
-
-
-
-
Method Detail
-
set
default void set(int k)
Replaces the last element returned bynext()
orprevious()
with the specified element (optional operation).- 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(int k)
Inserts the specified element into the list (optional operation).This default implementation just throws an
UnsupportedOperationException
.- 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 interfaceIterator<Integer>
- Specified by:
remove
in interfaceListIterator<Integer>
- See Also:
ListIterator.remove()
-
set
@Deprecated default void set(Integer k)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
set
in interfaceListIterator<Integer>
-
add
@Deprecated default void add(Integer k)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
add
in interfaceListIterator<Integer>
-
next
@Deprecated default Integer next()
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
next
in interfaceIntIterator
- Specified by:
next
in interfaceIterator<Integer>
- Specified by:
next
in interfaceListIterator<Integer>
- Specified by:
next
in interfacePrimitiveIterator.OfInt
-
previous
@Deprecated default Integer previous()
Deprecated.Please use the corresponding type-specific method instead.Returns the previous element from the collection.- Specified by:
previous
in interfaceBidirectionalIterator<Integer>
- Specified by:
previous
in interfaceIntBidirectionalIterator
- Specified by:
previous
in interfaceListIterator<Integer>
- Returns:
- the previous element from the collection.
- See Also:
ListIterator.previous()
-
-