it.unimi.dsi.fastutil.ints
Class IntIterators.UnmodifiableBidirectionalIterator
java.lang.Object
it.unimi.dsi.fastutil.ints.AbstractIntIterator
it.unimi.dsi.fastutil.ints.AbstractIntBidirectionalIterator
it.unimi.dsi.fastutil.ints.IntIterators.UnmodifiableBidirectionalIterator
- All Implemented Interfaces:
- BidirectionalIterator<Integer>, IntBidirectionalIterator, IntIterator, ObjectBidirectionalIterator<Integer>, ObjectIterator<Integer>, Iterator<Integer>
- Enclosing class:
- IntIterators
public static class IntIterators.UnmodifiableBidirectionalIterator
- extends AbstractIntBidirectionalIterator
An unmodifiable wrapper class for bidirectional iterators.
|
Method Summary |
boolean |
hasNext()
|
boolean |
hasPrevious()
Returns whether there is a previous element. |
Integer |
next()
Delegates to the corresponding type-specific method. |
int |
nextInt()
Delegates to the corresponding generic method. |
Integer |
previous()
Delegates to the corresponding type-specific method. |
int |
previousInt()
Delegates to the corresponding generic method. |
| Methods inherited from interface it.unimi.dsi.fastutil.ints.IntIterator |
skip |
IntIterators.UnmodifiableBidirectionalIterator
public IntIterators.UnmodifiableBidirectionalIterator(IntBidirectionalIterator 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()
nextInt
public int nextInt()
- Description copied from class:
AbstractIntIterator
- Delegates to the corresponding generic method.
- Specified by:
nextInt in interface IntIterator- Overrides:
nextInt in class AbstractIntIterator
- Returns:
- the next element in the iteration.
- See Also:
Iterator.next()
previousInt
public int previousInt()
- Description copied from class:
AbstractIntBidirectionalIterator
- Delegates to the corresponding generic method.
- Specified by:
previousInt in interface IntBidirectionalIterator- Overrides:
previousInt in class AbstractIntBidirectionalIterator
- Returns:
- the previous element in the iteration.
- See Also:
ListIterator.previous()
next
public Integer next()
- Description copied from class:
AbstractIntIterator
- Delegates to the corresponding type-specific method.
- Specified by:
next in interface Iterator<Integer>- Overrides:
next in class AbstractIntIterator
previous
public Integer previous()
- Description copied from class:
AbstractIntBidirectionalIterator
- Delegates to the corresponding type-specific method.
- Specified by:
previous in interface BidirectionalIterator<Integer>- Overrides:
previous in class AbstractIntBidirectionalIterator
- Returns:
- the previous element from the collection.
- See Also:
ListIterator.previous()