it.unimi.dsi.fastutil.chars
Class AbstractChar2IntSortedMap.KeySetIterator

java.lang.Object
  extended by it.unimi.dsi.fastutil.chars.AbstractCharIterator
      extended by it.unimi.dsi.fastutil.chars.AbstractCharBidirectionalIterator
          extended by it.unimi.dsi.fastutil.chars.AbstractChar2IntSortedMap.KeySetIterator
All Implemented Interfaces:
BidirectionalIterator<Character>, CharBidirectionalIterator, CharIterator, ObjectBidirectionalIterator<Character>, ObjectIterator<Character>, Iterator<Character>
Enclosing class:
AbstractChar2IntSortedMap

protected static class AbstractChar2IntSortedMap.KeySetIterator
extends AbstractCharBidirectionalIterator

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<Character,Integer>> i
           
 
Constructor Summary
AbstractChar2IntSortedMap.KeySetIterator(ObjectBidirectionalIterator<Map.Entry<Character,Integer>> i)
           
 
Method Summary
 boolean hasNext()
           
 boolean hasPrevious()
          Returns whether there is a previous element.
 char nextChar()
          Delegates to the corresponding generic method.
 char previousChar()
          Delegates to the corresponding generic method.
 
Methods inherited from class it.unimi.dsi.fastutil.chars.AbstractCharBidirectionalIterator
back, previous
 
Methods inherited from class it.unimi.dsi.fastutil.chars.AbstractCharIterator
next, 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.chars.CharIterator
skip
 
Methods inherited from interface it.unimi.dsi.fastutil.objects.ObjectIterator
skip
 
Methods inherited from interface java.util.Iterator
next, remove
 

Field Detail

i

protected final ObjectBidirectionalIterator<Map.Entry<Character,Integer>> i
Constructor Detail

AbstractChar2IntSortedMap.KeySetIterator

public AbstractChar2IntSortedMap.KeySetIterator(ObjectBidirectionalIterator<Map.Entry<Character,Integer>> i)
Method Detail

nextChar

public char nextChar()
Description copied from class: AbstractCharIterator
Delegates to the corresponding generic method.

Specified by:
nextChar in interface CharIterator
Overrides:
nextChar in class AbstractCharIterator
Returns:
the next element in the iteration.
See Also:
Iterator.next()

previousChar

public char previousChar()
Description copied from class: AbstractCharBidirectionalIterator
Delegates to the corresponding generic method.

Specified by:
previousChar in interface CharBidirectionalIterator
Overrides:
previousChar in class AbstractCharBidirectionalIterator
Returns:
the previous element in the iteration.
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.