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<java.lang.Short>, ObjectBidirectionalIterator<java.lang.Short>, ObjectIterator<java.lang.Short>, ShortBidirectionalIterator, ShortIterator, ShortListIterator, java.io.Serializable, java.lang.Cloneable, java.util.Iterator<java.lang.Short>, java.util.ListIterator<java.lang.Short>
Enclosing class:
ShortIterators

public static class ShortIterators.EmptyIterator
extends AbstractShortListIterator
implements java.io.Serializable, java.lang.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

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.
 java.lang.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
 

Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<java.lang.Short>
Specified by:
hasNext in interface java.util.ListIterator<java.lang.Short>

hasPrevious

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

Specified by:
hasPrevious in interface BidirectionalIterator<java.lang.Short>
Specified by:
hasPrevious in interface java.util.ListIterator<java.lang.Short>
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()
Specified by:
nextIndex in interface java.util.ListIterator<java.lang.Short>

previousIndex

public int previousIndex()
Specified by:
previousIndex in interface java.util.ListIterator<java.lang.Short>

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<java.lang.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<java.lang.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 java.lang.Object clone()
Overrides:
clone in class java.lang.Object