Package it.unimi.dsi.fastutil.longs
Interface LongListIterator
-
- All Superinterfaces:
BidirectionalIterator<Long>,Iterator<Long>,ListIterator<Long>,LongBidirectionalIterator,LongIterator,ObjectBidirectionalIterator<Long>,ObjectIterator<Long>,PrimitiveIterator<Long,LongConsumer>,PrimitiveIterator.OfLong
- All Known Implementing Classes:
AbstractLongListIterator,LongIterators.EmptyIterator,LongIterators.UnmodifiableListIterator
public interface LongListIterator extends LongBidirectionalIterator, ListIterator<Long>
A type-specific bidirectional iterator that is also aListIterator.This interface merges the methods provided by a
ListIteratorand 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
Modifier and Type Method Description default voidadd(long k)Inserts the specified element into the list (optional operation).default voidadd(Long k)Deprecated.Please use the corresponding type-specific method instead.default Longnext()Deprecated.Please use the corresponding type-specific method instead.default Longprevious()Deprecated.Please use the corresponding type-specific method instead.default voidremove()Removes from the underlying collection the last element returned by this iterator (optional operation).default voidset(long k)Replaces the last element returned bynext()orprevious()with the specified element (optional operation).default voidset(Long k)Deprecated.Please use the corresponding type-specific method instead.-
Methods inherited from interface it.unimi.dsi.fastutil.BidirectionalIterator
hasPrevious
-
Methods inherited from interface java.util.ListIterator
hasNext, hasPrevious, nextIndex, previousIndex
-
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongBidirectionalIterator
back, previousLong, skip
-
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongIterator
forEachRemaining, nextLong
-
Methods inherited from interface java.util.PrimitiveIterator.OfLong
forEachRemaining
-
-
-
-
Method Detail
-
set
default void set(long 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(long 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:
removein interfaceIterator<Long>- Specified by:
removein interfaceListIterator<Long>- See Also:
ListIterator.remove()
-
set
@Deprecated default void set(Long k)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
setin interfaceListIterator<Long>
-
add
@Deprecated default void add(Long k)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
addin interfaceListIterator<Long>
-
next
@Deprecated default Long next()
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
nextin interfaceIterator<Long>- Specified by:
nextin interfaceListIterator<Long>- Specified by:
nextin interfaceLongIterator- Specified by:
nextin interfacePrimitiveIterator.OfLong
-
previous
@Deprecated default Long previous()
Deprecated.Please use the corresponding type-specific method instead.Returns the previous element from the collection.- Specified by:
previousin interfaceBidirectionalIterator<Long>- Specified by:
previousin interfaceListIterator<Long>- Specified by:
previousin interfaceLongBidirectionalIterator- Returns:
- the previous element from the collection.
- See Also:
ListIterator.previous()
-
-