Package it.unimi.dsi.fastutil.shorts
Interface ShortListIterator
-
- All Superinterfaces:
BidirectionalIterator<Short>,Iterator<Short>,ListIterator<Short>,ObjectBidirectionalIterator<Short>,ObjectIterator<Short>,ShortBidirectionalIterator,ShortIterator
- All Known Implementing Classes:
AbstractShortListIterator,ShortIterators.EmptyIterator,ShortIterators.UnmodifiableListIterator
public interface ShortListIterator extends ShortBidirectionalIterator, ListIterator<Short>
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(short k)Inserts the specified element into the list (optional operation).default voidadd(Short k)Deprecated.Please use the corresponding type-specific method instead.default Shortnext()Deprecated.Please use the corresponding type-specific method instead.default Shortprevious()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(short k)Replaces the last element returned bynext()orprevious()with the specified element (optional operation).default voidset(Short 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.shorts.ShortBidirectionalIterator
back, previousShort, skip
-
Methods inherited from interface it.unimi.dsi.fastutil.shorts.ShortIterator
forEachRemaining, forEachRemaining, nextShort
-
-
-
-
Method Detail
-
set
default void set(short 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(short 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<Short>- Specified by:
removein interfaceListIterator<Short>- See Also:
ListIterator.remove()
-
set
@Deprecated default void set(Short k)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
setin interfaceListIterator<Short>
-
add
@Deprecated default void add(Short k)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
addin interfaceListIterator<Short>
-
next
@Deprecated default Short next()
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
nextin interfaceIterator<Short>- Specified by:
nextin interfaceListIterator<Short>- Specified by:
nextin interfaceShortIterator
-
previous
@Deprecated default Short previous()
Deprecated.Please use the corresponding type-specific method instead.Returns the previous element from the collection.- Specified by:
previousin interfaceBidirectionalIterator<Short>- Specified by:
previousin interfaceListIterator<Short>- Specified by:
previousin interfaceShortBidirectionalIterator- Returns:
- the previous element from the collection.
- See Also:
ListIterator.previous()
-
-