it.unimi.dsi.fastutil.objects
Class AbstractObject2LongSortedMap.KeySetIterator<K>

java.lang.Object
  extended by it.unimi.dsi.fastutil.objects.AbstractObjectIterator<K>
      extended by it.unimi.dsi.fastutil.objects.AbstractObjectBidirectionalIterator<K>
          extended by it.unimi.dsi.fastutil.objects.AbstractObject2LongSortedMap.KeySetIterator<K>
All Implemented Interfaces:
BidirectionalIterator<K>, ObjectBidirectionalIterator<K>, ObjectIterator<K>, Iterator<K>
Enclosing class:
AbstractObject2LongSortedMap<K>

protected static class AbstractObject2LongSortedMap.KeySetIterator<K>
extends AbstractObjectBidirectionalIterator<K>

A wrapper exhibiting a map iterator as an iterator on keys.

To provide an iterator on keys, just create an instance of this class using the corresponding iterator on entries.


Field Summary
protected  ObjectBidirectionalIterator<Map.Entry<K,Long>> i
           
 
Constructor Summary
AbstractObject2LongSortedMap.KeySetIterator(ObjectBidirectionalIterator<Map.Entry<K,Long>> i)
           
 
Method Summary
 boolean hasNext()
           
 boolean hasPrevious()
          Returns whether there is a previous element.
 K next()
           
 K previous()
          Returns the previous element from the collection.
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectBidirectionalIterator
back
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectIterator
remove, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.unimi.dsi.fastutil.objects.ObjectIterator
skip
 
Methods inherited from interface java.util.Iterator
remove
 

Field Detail

i

protected final ObjectBidirectionalIterator<Map.Entry<K,Long>> i
Constructor Detail

AbstractObject2LongSortedMap.KeySetIterator

public AbstractObject2LongSortedMap.KeySetIterator(ObjectBidirectionalIterator<Map.Entry<K,Long>> i)
Method Detail

next

public K next()

previous

public K previous()
Description copied from interface: BidirectionalIterator
Returns the previous element from the collection.

Returns:
the previous element from the collection.
See Also:
ListIterator.previous()

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()


Copyright © 2011. All Rights Reserved.