it.unimi.dsi.fastutil.objects
Class ObjectIterators.EmptyIterator<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.AbstractObjectListIterator<K>
              extended by it.unimi.dsi.fastutil.objects.ObjectIterators.EmptyIterator<K>
All Implemented Interfaces:
BidirectionalIterator<K>, ObjectBidirectionalIterator<K>, ObjectIterator<K>, ObjectListIterator<K>, Serializable, Cloneable, Iterator<K>, ListIterator<K>
Enclosing class:
ObjectIterators

public static class ObjectIterators.EmptyIterator<K>
extends AbstractObjectListIterator<K>
implements Serializable, Cloneable

A class returning no elements and a type-specific iterator interface.

This class may be useful to implement your own in case you subclass a type-specific iterator.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Method Summary
 int back(int n)
          This method just iterates the type-specific version of BidirectionalIterator.previous() for at most n times, stopping if BidirectionalIterator.hasPrevious() becomes false.
 Object clone()
           
 boolean hasNext()
           
 boolean hasPrevious()
          Returns whether there is a previous element.
 K next()
           
 int nextIndex()
           
 K previous()
          Returns the previous element from the collection.
 int previousIndex()
           
 int skip(int n)
          This method just iterates the type-specific version of Iterator.next() for at most n times, stopping if Iterator.hasNext() becomes false.
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectListIterator
add, set
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectIterator
remove
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.ListIterator
remove
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<K>
Specified by:
hasNext in interface ListIterator<K>

hasPrevious

public boolean hasPrevious()
Description copied from interface: BidirectionalIterator
Returns whether there is a previous element.

Specified by:
hasPrevious in interface BidirectionalIterator<K>
Specified by:
hasPrevious in interface ListIterator<K>
Returns:
whether there is a previous element.
See Also:
ListIterator.hasPrevious()

next

public K next()
Specified by:
next in interface Iterator<K>
Specified by:
next in interface ListIterator<K>

previous

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

Specified by:
previous in interface BidirectionalIterator<K>
Specified by:
previous in interface ListIterator<K>
Returns:
the previous element from the collection.
See Also:
ListIterator.previous()

nextIndex

public int nextIndex()
Specified by:
nextIndex in interface ListIterator<K>

previousIndex

public int previousIndex()
Specified by:
previousIndex in interface ListIterator<K>

skip

public int skip(int n)
Description copied from class: AbstractObjectIterator
This method just iterates the type-specific version of Iterator.next() for at most n times, stopping if Iterator.hasNext() becomes false.

Specified by:
skip in interface ObjectIterator<K>
Overrides:
skip in class AbstractObjectIterator<K>
Parameters:
n - the number of elements to skip.
Returns:
the number of elements actually skipped.
See Also:
Iterator.next()

back

public int back(int n)
Description copied from class: AbstractObjectBidirectionalIterator
This method just iterates the type-specific version of BidirectionalIterator.previous() for at most n times, stopping if BidirectionalIterator.hasPrevious() becomes false.

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

clone

public Object clone()
Overrides:
clone in class Object