it.unimi.dsi.fastutil.ints
Class IntIterators.EmptyIterator

java.lang.Object
  extended by it.unimi.dsi.fastutil.ints.AbstractIntIterator
      extended by it.unimi.dsi.fastutil.ints.AbstractIntBidirectionalIterator
          extended by it.unimi.dsi.fastutil.ints.AbstractIntListIterator
              extended by it.unimi.dsi.fastutil.ints.IntIterators.EmptyIterator
All Implemented Interfaces:
BidirectionalIterator<Integer>, IntBidirectionalIterator, IntIterator, IntListIterator, ObjectBidirectionalIterator<Integer>, ObjectIterator<Integer>, Serializable, Cloneable, Iterator<Integer>, ListIterator<Integer>
Enclosing class:
IntIterators

public static class IntIterators.EmptyIterator
extends AbstractIntListIterator
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 IntIterators.EmptyIterator()
           
 
Method Summary
 int back(int n)
          This method just iterates the type-specific version of AbstractIntBidirectionalIterator.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()
           
 int nextInt()
          Delegates to the corresponding generic method.
 int previousIndex()
           
 int previousInt()
          Delegates to the corresponding generic method.
 int skip(int n)
          This method just iterates the type-specific version of AbstractIntIterator.next() for at most n times, stopping if Iterator.hasNext() becomes false.
 
Methods inherited from class it.unimi.dsi.fastutil.ints.AbstractIntListIterator
add, add, set, set
 
Methods inherited from class it.unimi.dsi.fastutil.ints.AbstractIntBidirectionalIterator
previous
 
Methods inherited from class it.unimi.dsi.fastutil.ints.AbstractIntIterator
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

IntIterators.EmptyIterator

protected IntIterators.EmptyIterator()
Method Detail

hasNext

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

hasPrevious

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

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

nextInt

public int nextInt()
Description copied from class: AbstractIntIterator
Delegates to the corresponding generic method.

Specified by:
nextInt in interface IntIterator
Overrides:
nextInt in class AbstractIntIterator
Returns:
the next element in the iteration.
See Also:
Iterator.next()

previousInt

public int previousInt()
Description copied from class: AbstractIntBidirectionalIterator
Delegates to the corresponding generic method.

Specified by:
previousInt in interface IntBidirectionalIterator
Overrides:
previousInt in class AbstractIntBidirectionalIterator
Returns:
the previous element in the iteration.
See Also:
ListIterator.previous()

nextIndex

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

previousIndex

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

skip

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

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

Specified by:
back in interface IntBidirectionalIterator
Specified by:
back in interface ObjectBidirectionalIterator<Integer>
Overrides:
back in class AbstractIntBidirectionalIterator
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.