it.unimi.dsi.fastutil.longs
Class LongIterators.UnmodifiableBidirectionalIterator
java.lang.Object
it.unimi.dsi.fastutil.longs.AbstractLongIterator
it.unimi.dsi.fastutil.longs.AbstractLongBidirectionalIterator
it.unimi.dsi.fastutil.longs.LongIterators.UnmodifiableBidirectionalIterator
- All Implemented Interfaces:
- BidirectionalIterator<java.lang.Long>, LongBidirectionalIterator, LongIterator, ObjectBidirectionalIterator<java.lang.Long>, ObjectIterator<java.lang.Long>, java.util.Iterator<java.lang.Long>
- Enclosing class:
- LongIterators
public static class LongIterators.UnmodifiableBidirectionalIterator
- extends AbstractLongBidirectionalIterator
An unmodifiable wrapper class for bidirectional iterators.
Method Summary |
boolean |
hasNext()
|
boolean |
hasPrevious()
Returns whether there is a previous element. |
java.lang.Long |
next()
Delegates to the corresponding type-specific method. |
long |
nextLong()
Delegates to the corresponding generic method. |
java.lang.Long |
previous()
Delegates to the corresponding type-specific method. |
long |
previousLong()
Delegates to the corresponding generic method. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Iterator |
remove |
LongIterators.UnmodifiableBidirectionalIterator
public LongIterators.UnmodifiableBidirectionalIterator(LongBidirectionalIterator i)
hasNext
public boolean hasNext()
hasPrevious
public boolean hasPrevious()
- Description copied from interface:
BidirectionalIterator
- Returns whether there is a previous element.
- Returns:
- whether there is a previous element.
- See Also:
ListIterator.hasPrevious()
nextLong
public long nextLong()
- Description copied from class:
AbstractLongIterator
- Delegates to the corresponding generic method.
- Specified by:
nextLong
in interface LongIterator
- Overrides:
nextLong
in class AbstractLongIterator
- Returns:
- the next element in the iteration.
- See Also:
Iterator.next()
previousLong
public long previousLong()
- Description copied from class:
AbstractLongBidirectionalIterator
- Delegates to the corresponding generic method.
- Specified by:
previousLong
in interface LongBidirectionalIterator
- Overrides:
previousLong
in class AbstractLongBidirectionalIterator
- Returns:
- the previous element in the iteration.
- See Also:
ListIterator.previous()
next
public java.lang.Long next()
- Description copied from class:
AbstractLongIterator
- Delegates to the corresponding type-specific method.
- Specified by:
next
in interface java.util.Iterator<java.lang.Long>
- Overrides:
next
in class AbstractLongIterator
previous
public java.lang.Long previous()
- Description copied from class:
AbstractLongBidirectionalIterator
- Delegates to the corresponding type-specific method.
- Specified by:
previous
in interface BidirectionalIterator<java.lang.Long>
- Overrides:
previous
in class AbstractLongBidirectionalIterator
- Returns:
- the previous element from the collection.
- See Also:
ListIterator.previous()