it.unimi.dsi.fastutil.longs
Class LongIterators.EmptyIterator

java.lang.Object
  extended by it.unimi.dsi.fastutil.longs.AbstractLongIterator
      extended by it.unimi.dsi.fastutil.longs.AbstractLongBidirectionalIterator
          extended by it.unimi.dsi.fastutil.longs.AbstractLongListIterator
              extended by it.unimi.dsi.fastutil.longs.LongIterators.EmptyIterator
All Implemented Interfaces:
BidirectionalIterator<Long>, LongBidirectionalIterator, LongIterator, LongListIterator, ObjectBidirectionalIterator<Long>, ObjectIterator<Long>, Serializable, Cloneable, Iterator<Long>, ListIterator<Long>
Enclosing class:
LongIterators

public static class LongIterators.EmptyIterator
extends AbstractLongListIterator
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
           
 
Constructor Summary
protected LongIterators.EmptyIterator()
           
 
Method Summary
 int back(int n)
          This method just iterates the type-specific version of AbstractLongBidirectionalIterator.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()
           
 long nextLong()
          Delegates to the corresponding generic method.
 int previousIndex()
           
 long previousLong()
          Delegates to the corresponding generic method.
 int skip(int n)
          This method just iterates the type-specific version of AbstractLongIterator.next() for at most n times, stopping if Iterator.hasNext() becomes false.
 
Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongListIterator
add, add, set, set
 
Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongBidirectionalIterator
previous
 
Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongIterator
next, remove
 
Methods inherited from class java.lang.Object
equals, finalize, 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
Constructor Detail

LongIterators.EmptyIterator

protected LongIterators.EmptyIterator()
Method Detail

hasNext

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

hasPrevious

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

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

nextLong

public long nextLong()
Description copied from class: AbstractLongIterator
Delegates to the corresponding generic method.

Specified by:
nextLong in interface LongIterator
Overrides:
nextLong in class AbstractLongIterator
Returns:
the next element in the iteration.
See Also:
Iterator.next()

previousLong

public long previousLong()
Description copied from class: AbstractLongBidirectionalIterator
Delegates to the corresponding generic method.

Specified by:
previousLong in interface LongBidirectionalIterator
Overrides:
previousLong in class AbstractLongBidirectionalIterator
Returns:
the previous element in the iteration.
See Also:
ListIterator.previous()

nextIndex

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

previousIndex

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

skip

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

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

Specified by:
back in interface LongBidirectionalIterator
Specified by:
back in interface ObjectBidirectionalIterator<Long>
Overrides:
back in class AbstractLongBidirectionalIterator
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


Copyright © 2011. All Rights Reserved.