it.unimi.dsi.fastutil.shorts
Class ShortIterators.EmptyIterator

java.lang.Object
  extended by it.unimi.dsi.fastutil.shorts.AbstractShortIterator
      extended by it.unimi.dsi.fastutil.shorts.AbstractShortBidirectionalIterator
          extended by it.unimi.dsi.fastutil.shorts.AbstractShortListIterator
              extended by it.unimi.dsi.fastutil.shorts.ShortIterators.EmptyIterator
All Implemented Interfaces:
BidirectionalIterator<Short>, ObjectBidirectionalIterator<Short>, ObjectIterator<Short>, ShortBidirectionalIterator, ShortIterator, ShortListIterator, Iterator<Short>, ListIterator<Short>
Enclosing class:
ShortIterators

public static class ShortIterators.EmptyIterator
extends AbstractShortListIterator

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 AbstractShortBidirectionalIterator.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.
 int nextIndex()
           
 short nextShort()
          Delegates to the corresponding generic method.
 int previousIndex()
           
 short previousShort()
          Delegates to the corresponding generic method.
 int skip(int n)
          This method just iterates the type-specific version of AbstractShortIterator.next() for at most n times, stopping if Iterator.hasNext() becomes false.
 
Methods inherited from class it.unimi.dsi.fastutil.shorts.AbstractShortListIterator
add, add, set, set
 
Methods inherited from class it.unimi.dsi.fastutil.shorts.AbstractShortBidirectionalIterator
previous
 
Methods inherited from class it.unimi.dsi.fastutil.shorts.AbstractShortIterator
next, remove
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.ListIterator
next, previous, remove
 
Methods inherited from interface it.unimi.dsi.fastutil.BidirectionalIterator
previous
 

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

nextShort

public short nextShort()
Description copied from class: AbstractShortIterator
Delegates to the corresponding generic method.

Specified by:
nextShort in interface ShortIterator
Overrides:
nextShort in class AbstractShortIterator
Returns:
the next element in the iteration.
See Also:
Iterator.next()

previousShort

public short previousShort()
Description copied from class: AbstractShortBidirectionalIterator
Delegates to the corresponding generic method.

Specified by:
previousShort in interface ShortBidirectionalIterator
Overrides:
previousShort in class AbstractShortBidirectionalIterator
Returns:
the previous element in the iteration.
See Also:
ListIterator.previous()

nextIndex

public int nextIndex()

previousIndex

public int previousIndex()

skip

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

Specified by:
skip in interface ObjectIterator<Short>
Specified by:
skip in interface ShortIterator
Overrides:
skip in class AbstractShortIterator
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: AbstractShortBidirectionalIterator
This method just iterates the type-specific version of AbstractShortBidirectionalIterator.previous() for at most n times, stopping if BidirectionalIterator.hasPrevious() becomes false.

Specified by:
back in interface ObjectBidirectionalIterator<Short>
Specified by:
back in interface ShortBidirectionalIterator
Overrides:
back in class AbstractShortBidirectionalIterator
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