it.unimi.dsi.fastutil.bytes
Interface ByteBidirectionalIterator

All Superinterfaces:
BidirectionalIterator<Byte>, ByteIterator, Iterator<Byte>, ObjectBidirectionalIterator<Byte>, ObjectIterator<Byte>
All Known Subinterfaces:
ByteBigListIterator, ByteListIterator
All Known Implementing Classes:
AbstractByte2BooleanSortedMap.KeySetIterator, AbstractByte2ByteSortedMap.KeySetIterator, AbstractByte2CharSortedMap.KeySetIterator, AbstractByte2DoubleSortedMap.KeySetIterator, AbstractByte2FloatSortedMap.KeySetIterator, AbstractByte2IntSortedMap.KeySetIterator, AbstractByte2LongSortedMap.KeySetIterator, AbstractByte2ObjectSortedMap.KeySetIterator, AbstractByte2ReferenceSortedMap.KeySetIterator, AbstractByte2ShortSortedMap.KeySetIterator, AbstractByteBidirectionalIterator, AbstractByteBigListIterator, AbstractByteListIterator, ByteBigListIterators.BigListIteratorListIterator, ByteBigListIterators.EmptyBigListIterator, ByteBigListIterators.UnmodifiableBigListIterator, ByteIterators.EmptyIterator, ByteIterators.UnmodifiableBidirectionalIterator, ByteIterators.UnmodifiableListIterator

public interface ByteBidirectionalIterator
extends ByteIterator, ObjectBidirectionalIterator<Byte>

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.
 byte previousByte()
          Returns the previous element as a primitive type.
 
Methods inherited from interface it.unimi.dsi.fastutil.bytes.ByteIterator
nextByte, 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

previousByte

byte previousByte()
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<Byte>
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.