Interface CharBidirectionalIterator
-
- All Superinterfaces:
BidirectionalIterator<Character>,CharIterator,Iterator<Character>,ObjectBidirectionalIterator<Character>,ObjectIterator<Character>
- All Known Subinterfaces:
CharListIterator
- All Known Implementing Classes:
AbstractCharBidirectionalIterator,AbstractCharListIterator,CharIterators.EmptyIterator,CharIterators.UnmodifiableBidirectionalIterator,CharIterators.UnmodifiableListIterator
public interface CharBidirectionalIterator extends CharIterator, ObjectBidirectionalIterator<Character>
A type-specific bidirectional iterator; provides an additional method to avoid (un)boxing, and the possibility to skip elements backwards.- See Also:
BidirectionalIterator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intback(int n)Moves back for the given number of elements.charpreviousChar()Returns the previous element as a primitive type.-
Methods inherited from interface org.codelibs.jhighlight.fastutil.BidirectionalIterator
hasPrevious, previous
-
Methods inherited from interface org.codelibs.jhighlight.fastutil.chars.CharIterator
nextChar, skip
-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Methods inherited from interface org.codelibs.jhighlight.fastutil.objects.ObjectIterator
skip
-
-
-
-
Method Detail
-
previousChar
char previousChar()
Returns the previous element as a primitive type.- Returns:
- the previous element in the iteration.
- See Also:
ListIterator.previous()
-
back
int back(int n)
Moves back for the given number of elements.The effect of this call is exactly the same as that of calling
BidirectionalIterator.previous()forntimes (possibly stopping ifBidirectionalIterator.hasPrevious()becomes false).- Specified by:
backin interfaceObjectBidirectionalIterator<Character>- Parameters:
n- the number of elements to skip back.- Returns:
- the number of elements actually skipped.
- See Also:
Iterator.next()
-
-