it.unimi.dsi.fastutil.booleans
Class BooleanIterators.EmptyIterator

java.lang.Object
  extended by it.unimi.dsi.fastutil.booleans.AbstractBooleanIterator
      extended by it.unimi.dsi.fastutil.booleans.AbstractBooleanBidirectionalIterator
          extended by it.unimi.dsi.fastutil.booleans.AbstractBooleanListIterator
              extended by it.unimi.dsi.fastutil.booleans.BooleanIterators.EmptyIterator
All Implemented Interfaces:
BidirectionalIterator<Boolean>, BooleanBidirectionalIterator, BooleanIterator, BooleanListIterator, ObjectBidirectionalIterator<Boolean>, ObjectIterator<Boolean>, Serializable, Cloneable, Iterator<Boolean>, ListIterator<Boolean>
Enclosing class:
BooleanIterators

public static class BooleanIterators.EmptyIterator
extends AbstractBooleanListIterator
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
           
 
Method Summary
 int back(int n)
          This method just iterates the type-specific version of AbstractBooleanBidirectionalIterator.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.
 boolean nextBoolean()
          Delegates to the corresponding generic method.
 int nextIndex()
           
 boolean previousBoolean()
          Delegates to the corresponding generic method.
 int previousIndex()
           
 int skip(int n)
          This method just iterates the type-specific version of AbstractBooleanIterator.next() for at most n times, stopping if Iterator.hasNext() becomes false.
 
Methods inherited from class it.unimi.dsi.fastutil.booleans.AbstractBooleanListIterator
add, add, set, set
 
Methods inherited from class it.unimi.dsi.fastutil.booleans.AbstractBooleanBidirectionalIterator
previous
 
Methods inherited from class it.unimi.dsi.fastutil.booleans.AbstractBooleanIterator
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()
Specified by:
hasNext in interface Iterator<Boolean>
Specified by:
hasNext in interface ListIterator<Boolean>

hasPrevious

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

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

nextBoolean

public boolean nextBoolean()
Description copied from class: AbstractBooleanIterator
Delegates to the corresponding generic method.

Specified by:
nextBoolean in interface BooleanIterator
Overrides:
nextBoolean in class AbstractBooleanIterator
Returns:
the next element in the iteration.
See Also:
Iterator.next()

previousBoolean

public boolean previousBoolean()
Description copied from class: AbstractBooleanBidirectionalIterator
Delegates to the corresponding generic method.

Specified by:
previousBoolean in interface BooleanBidirectionalIterator
Overrides:
previousBoolean in class AbstractBooleanBidirectionalIterator
Returns:
the previous element in the iteration.
See Also:
ListIterator.previous()

nextIndex

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

previousIndex

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

skip

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

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

Specified by:
back in interface BooleanBidirectionalIterator
Specified by:
back in interface ObjectBidirectionalIterator<Boolean>
Overrides:
back in class AbstractBooleanBidirectionalIterator
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