it.unimi.dsi.fastutil.chars
Interface CharBidirectionalIterator

All Superinterfaces:
BidirectionalIterator<Character>, CharIterator, Iterator<Character>, ObjectBidirectionalIterator<Character>, ObjectIterator<Character>
All Known Subinterfaces:
CharBigListIterator, CharListIterator
All Known Implementing Classes:
AbstractChar2BooleanSortedMap.KeySetIterator, AbstractChar2ByteSortedMap.KeySetIterator, AbstractChar2CharSortedMap.KeySetIterator, AbstractChar2DoubleSortedMap.KeySetIterator, AbstractChar2FloatSortedMap.KeySetIterator, AbstractChar2IntSortedMap.KeySetIterator, AbstractChar2LongSortedMap.KeySetIterator, AbstractChar2ObjectSortedMap.KeySetIterator, AbstractChar2ReferenceSortedMap.KeySetIterator, AbstractChar2ShortSortedMap.KeySetIterator, AbstractCharBidirectionalIterator, AbstractCharBigListIterator, AbstractCharListIterator, CharBigListIterators.BigListIteratorListIterator, CharBigListIterators.EmptyBigListIterator, CharBigListIterators.UnmodifiableBigListIterator, 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
 int back(int n)
          Moves back for the given number of elements.
 char previousChar()
          Returns the previous element as a primitive type.
 
Methods inherited from interface it.unimi.dsi.fastutil.chars.CharIterator
nextChar, skip
 
Methods inherited from interface it.unimi.dsi.fastutil.objects.ObjectIterator
skip
 
Methods inherited from interface it.unimi.dsi.fastutil.BidirectionalIterator
hasPrevious, previous
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

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() for n times (possibly stopping if BidirectionalIterator.hasPrevious() becomes false).

Specified by:
back in interface ObjectBidirectionalIterator<Character>
Parameters:
n - the number of elements to skip back.
Returns:
the number of elements actually skipped.
See Also:
Iterator.next()


Copyright © 2011. All Rights Reserved.