it.unimi.dsi.fastutil
Class Iterators.EmptyIterator

java.lang.Object
  extended byit.unimi.dsi.fastutil.objects.AbstractObjectIterator
      extended byit.unimi.dsi.fastutil.objects.AbstractObjectBidirectionalIterator
          extended byit.unimi.dsi.fastutil.objects.AbstractObjectListIterator
              extended byit.unimi.dsi.fastutil.Iterators.EmptyIterator
All Implemented Interfaces:
BidirectionalIterator, BooleanBidirectionalIterator, BooleanIterator, BooleanListIterator, ByteBidirectionalIterator, ByteIterator, ByteListIterator, CharBidirectionalIterator, CharIterator, CharListIterator, DoubleBidirectionalIterator, DoubleIterator, DoubleListIterator, FloatBidirectionalIterator, FloatIterator, FloatListIterator, IntBidirectionalIterator, IntIterator, IntListIterator, Iterator, ListIterator, LongBidirectionalIterator, LongIterator, LongListIterator, ObjectBidirectionalIterator, ObjectIterator, ObjectListIterator, ShortBidirectionalIterator, ShortIterator, ShortListIterator
Enclosing class:
Iterators

public static class Iterators.EmptyIterator
extends AbstractObjectListIterator
implements BooleanListIterator, ByteListIterator, ShortListIterator, IntListIterator, LongListIterator, CharListIterator, FloatListIterator, DoubleListIterator, ObjectListIterator

A class returning no elements and implementing all type-specific iterator interfaces.

This class may be useful to implement your own in case you subclass a type-specific iterator.


Field Summary
static long serialVersionUID
           
 
Method Summary
 void add(boolean x)
           
 void add(byte x)
           
 void add(char x)
           
 void add(double x)
           
 void add(float x)
           
 void add(int x)
           
 void add(long x)
           
 void add(short x)
           
 Object clone()
           
 boolean hasNext()
           
 boolean hasPrevious()
          Returns whether there is a previous element.
 Object next()
           
 boolean nextBoolean()
          Returns the next element as a primitive type.
 byte nextByte()
          Returns the next element as a primitive type.
 char nextChar()
          Returns the next element as a primitive type.
 double nextDouble()
          Returns the next element as a primitive type.
 float nextFloat()
          Returns the next element as a primitive type.
 int nextIndex()
           
 int nextInt()
          Returns the next element as a primitive type.
 long nextLong()
          Returns the next element as a primitive type.
 short nextShort()
          Returns the next element as a primitive type.
 Object previous()
          Returns the previous element from the collection.
 boolean previousBoolean()
          Returns the previous element as a primitive type.
 byte previousByte()
          Returns the previous element as a primitive type.
 char previousChar()
          Returns the previous element as a primitive type.
 double previousDouble()
          Returns the previous element as a primitive type.
 float previousFloat()
          Returns the previous element as a primitive type.
 int previousIndex()
           
 int previousInt()
          Returns the previous element as a primitive type.
 long previousLong()
          Returns the previous element as a primitive type.
 short previousShort()
          Returns the previous element as a primitive type.
 void set(boolean x)
           
 void set(byte x)
           
 void set(char x)
           
 void set(double x)
           
 void set(float x)
           
 void set(int x)
           
 void set(long x)
           
 void set(short x)
           
 int skip(int n)
          Skips the given number of elements.
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectListIterator
add, set
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectBidirectionalIterator
back
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectIterator
remove
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.ListIterator
add, remove, set
 
Methods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanBidirectionalIterator
back
 
Methods inherited from interface it.unimi.dsi.fastutil.bytes.ByteBidirectionalIterator
back
 
Methods inherited from interface it.unimi.dsi.fastutil.shorts.ShortBidirectionalIterator
back
 
Methods inherited from interface it.unimi.dsi.fastutil.ints.IntBidirectionalIterator
back
 
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongBidirectionalIterator
back
 
Methods inherited from interface it.unimi.dsi.fastutil.chars.CharBidirectionalIterator
back
 
Methods inherited from interface it.unimi.dsi.fastutil.floats.FloatBidirectionalIterator
back
 
Methods inherited from interface it.unimi.dsi.fastutil.doubles.DoubleBidirectionalIterator
back
 
Methods inherited from interface it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator
back
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface ListIterator

hasPrevious

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

Specified by:
hasPrevious in interface ListIterator

nextBoolean

public boolean nextBoolean()
Description copied from interface: BooleanIterator
Returns the next element as a primitive type.

Specified by:
nextBoolean in interface BooleanIterator
Returns:
the next element from the collection.
See Also:
Iterator.next()

previousBoolean

public boolean previousBoolean()
Description copied from interface: BooleanBidirectionalIterator
Returns the previous element as a primitive type.

Specified by:
previousBoolean in interface BooleanBidirectionalIterator
Returns:
the previous element from the collection.
See Also:
ListIterator.previous()

nextByte

public byte nextByte()
Description copied from interface: ByteIterator
Returns the next element as a primitive type.

Specified by:
nextByte in interface ByteIterator
Returns:
the next element from the collection.
See Also:
Iterator.next()

previousByte

public byte previousByte()
Description copied from interface: ByteBidirectionalIterator
Returns the previous element as a primitive type.

Specified by:
previousByte in interface ByteBidirectionalIterator
Returns:
the previous element from the collection.
See Also:
ListIterator.previous()

nextShort

public short nextShort()
Description copied from interface: ShortIterator
Returns the next element as a primitive type.

Specified by:
nextShort in interface ShortIterator
Returns:
the next element from the collection.
See Also:
Iterator.next()

previousShort

public short previousShort()
Description copied from interface: ShortBidirectionalIterator
Returns the previous element as a primitive type.

Specified by:
previousShort in interface ShortBidirectionalIterator
Returns:
the previous element from the collection.
See Also:
ListIterator.previous()

nextInt

public int nextInt()
Description copied from interface: IntIterator
Returns the next element as a primitive type.

Specified by:
nextInt in interface IntIterator
Returns:
the next element from the collection.
See Also:
Iterator.next()

previousInt

public int previousInt()
Description copied from interface: IntBidirectionalIterator
Returns the previous element as a primitive type.

Specified by:
previousInt in interface IntBidirectionalIterator
Returns:
the previous element from the collection.
See Also:
ListIterator.previous()

nextLong

public long nextLong()
Description copied from interface: LongIterator
Returns the next element as a primitive type.

Specified by:
nextLong in interface LongIterator
Returns:
the next element from the collection.
See Also:
Iterator.next()

previousLong

public long previousLong()
Description copied from interface: LongBidirectionalIterator
Returns the previous element as a primitive type.

Specified by:
previousLong in interface LongBidirectionalIterator
Returns:
the previous element from the collection.
See Also:
ListIterator.previous()

nextChar

public char nextChar()
Description copied from interface: CharIterator
Returns the next element as a primitive type.

Specified by:
nextChar in interface CharIterator
Returns:
the next element from the collection.
See Also:
Iterator.next()

previousChar

public char previousChar()
Description copied from interface: CharBidirectionalIterator
Returns the previous element as a primitive type.

Specified by:
previousChar in interface CharBidirectionalIterator
Returns:
the previous element from the collection.
See Also:
ListIterator.previous()

nextFloat

public float nextFloat()
Description copied from interface: FloatIterator
Returns the next element as a primitive type.

Specified by:
nextFloat in interface FloatIterator
Returns:
the next element from the collection.
See Also:
Iterator.next()

previousFloat

public float previousFloat()
Description copied from interface: FloatBidirectionalIterator
Returns the previous element as a primitive type.

Specified by:
previousFloat in interface FloatBidirectionalIterator
Returns:
the previous element from the collection.
See Also:
ListIterator.previous()

nextDouble

public double nextDouble()
Description copied from interface: DoubleIterator
Returns the next element as a primitive type.

Specified by:
nextDouble in interface DoubleIterator
Returns:
the next element from the collection.
See Also:
Iterator.next()

previousDouble

public double previousDouble()
Description copied from interface: DoubleBidirectionalIterator
Returns the previous element as a primitive type.

Specified by:
previousDouble in interface DoubleBidirectionalIterator
Returns:
the previous element from the collection.
See Also:
ListIterator.previous()

next

public Object next()
Specified by:
next in interface ListIterator

previous

public Object previous()
Description copied from interface: BidirectionalIterator
Returns the previous element from the collection.

Specified by:
previous in interface ListIterator

nextIndex

public int nextIndex()
Specified by:
nextIndex in interface ListIterator

previousIndex

public int previousIndex()
Specified by:
previousIndex in interface ListIterator

skip

public int skip(int n)
Description copied from interface: BooleanIterator
Skips the given number of elements.

The effect of this call is exactly the same as that of calling Iterator.next() for n times (possibly stopping if Iterator.hasNext() becomes false).

Specified by:
skip in interface BooleanIterator
Overrides:
skip in class AbstractObjectIterator

set

public void set(boolean x)
Specified by:
set in interface BooleanListIterator

add

public void add(boolean x)
Specified by:
add in interface BooleanListIterator

set

public void set(byte x)
Specified by:
set in interface ByteListIterator

add

public void add(byte x)
Specified by:
add in interface ByteListIterator

set

public void set(short x)
Specified by:
set in interface ShortListIterator

add

public void add(short x)
Specified by:
add in interface ShortListIterator

set

public void set(int x)
Specified by:
set in interface IntListIterator

add

public void add(int x)
Specified by:
add in interface IntListIterator

set

public void set(long x)
Specified by:
set in interface LongListIterator

add

public void add(long x)
Specified by:
add in interface LongListIterator

set

public void set(char x)
Specified by:
set in interface CharListIterator

add

public void add(char x)
Specified by:
add in interface CharListIterator

set

public void set(float x)
Specified by:
set in interface FloatListIterator

add

public void add(float x)
Specified by:
add in interface FloatListIterator

set

public void set(double x)
Specified by:
set in interface DoubleListIterator

add

public void add(double x)
Specified by:
add in interface DoubleListIterator

clone

public Object clone()