Package it.unimi.dsi.fastutil.objects
Interface ObjectListIterator<K>
-
- All Superinterfaces:
BidirectionalIterator<K>,Iterator<K>,ListIterator<K>,ObjectBidirectionalIterator<K>,ObjectIterator<K>
- All Known Implementing Classes:
AbstractObjectListIterator,ObjectIterators.EmptyIterator,ObjectIterators.UnmodifiableListIterator
public interface ObjectListIterator<K> extends ObjectBidirectionalIterator<K>, ListIterator<K>
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
-
-
Method Summary
Modifier and Type Method Description default voidadd(K k)Inserts the specified element into the list (optional operation).default voidremove()Removes from the underlying collection the last element returned by this iterator (optional operation).default voidset(K k)Replaces the last element returned byIterator.next()orBidirectionalIterator.previous()with the specified element (optional operation).-
Methods inherited from interface it.unimi.dsi.fastutil.BidirectionalIterator
hasPrevious, previous
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Methods inherited from interface java.util.ListIterator
hasNext, hasPrevious, next, nextIndex, previous, previousIndex
-
Methods inherited from interface it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator
back, skip
-
-
-
-
Method Detail
-
set
default void set(K k)
Replaces the last element returned byIterator.next()orBidirectionalIterator.previous()with the specified element (optional operation).- Specified by:
setin interfaceListIterator<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:
addin interfaceListIterator<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:
removein interfaceIterator<K>- Specified by:
removein interfaceListIterator<K>- See Also:
ListIterator.remove()
-
-