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>, Iterator<K>, ListIterator<K>
Enclosing class:
ObjectIterators

public static class ObjectIterators.EmptyIterator<K>
extends AbstractObjectListIterator<K>

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.


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

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

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

nextIndex

public int nextIndex()

previousIndex

public int previousIndex()

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