Package it.unimi.dsi.fastutil.longs
Interface LongListIterator
- All Superinterfaces:
BidirectionalIterator<java.lang.Long>,java.util.Iterator<java.lang.Long>,java.util.ListIterator<java.lang.Long>,LongBidirectionalIterator,LongIterator,ObjectBidirectionalIterator<java.lang.Long>,ObjectIterator<java.lang.Long>,java.util.PrimitiveIterator<java.lang.Long,java.util.function.LongConsumer>,java.util.PrimitiveIterator.OfLong
- All Known Implementing Classes:
AbstractLongListIterator,LongIterators.AbstractIndexBasedListIterator,LongIterators.EmptyIterator,LongIterators.UnmodifiableListIterator
public interface LongListIterator extends LongBidirectionalIterator, java.util.ListIterator<java.lang.Long>
A type-specific bidirectional iterator that is also a
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().
- See Also:
ListIterator,BidirectionalIterator
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.PrimitiveIterator
java.util.PrimitiveIterator.OfDouble, java.util.PrimitiveIterator.OfInt, java.util.PrimitiveIterator.OfLong -
Method Summary
Modifier and Type Method Description default voidadd(long k)Inserts the specified element into the list (optional operation).default voidadd(java.lang.Long k)Deprecated.Please use the corresponding type-specific method instead.default java.lang.Longnext()Deprecated.Please use the corresponding type-specific method instead.default java.lang.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(java.lang.Long k)Deprecated.Please use the corresponding type-specific method instead.Methods inherited from interface it.unimi.dsi.fastutil.BidirectionalIterator
hasPreviousMethods inherited from interface java.util.ListIterator
hasNext, hasPrevious, nextIndex, previousIndexMethods inherited from interface it.unimi.dsi.fastutil.longs.LongBidirectionalIterator
back, previousLong, skipMethods inherited from interface it.unimi.dsi.fastutil.longs.LongIterator
forEachRemaining, forEachRemaining, nextLongMethods inherited from interface java.util.PrimitiveIterator.OfLong
forEachRemaining
-
Method Details
-
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 interfacejava.util.Iterator<java.lang.Long>- Specified by:
removein interfacejava.util.ListIterator<java.lang.Long>- See Also:
ListIterator.remove()
-
set
@Deprecated default void set(java.lang.Long k)Deprecated.Please use the corresponding type-specific method instead.- Specified by:
setin interfacejava.util.ListIterator<java.lang.Long>
-
add
@Deprecated default void add(java.lang.Long k)Deprecated.Please use the corresponding type-specific method instead.- Specified by:
addin interfacejava.util.ListIterator<java.lang.Long>
-
next
@Deprecated default java.lang.Long next()Deprecated.Please use the corresponding type-specific method instead.- Specified by:
nextin interfacejava.util.Iterator<java.lang.Long>- Specified by:
nextin interfacejava.util.ListIterator<java.lang.Long>- Specified by:
nextin interfaceLongIterator- Specified by:
nextin interfacejava.util.PrimitiveIterator.OfLong
-
previous
@Deprecated default java.lang.Long previous()Deprecated.Please use the corresponding type-specific method instead.Returns the previous element from the collection.- Specified by:
previousin interfaceBidirectionalIterator<java.lang.Long>- Specified by:
previousin interfacejava.util.ListIterator<java.lang.Long>- Specified by:
previousin interfaceLongBidirectionalIterator- Returns:
- the previous element from the collection.
- See Also:
ListIterator.previous()
-