it.unimi.dsi.fastutil.longs
Class LongIterators.EmptyIterator
java.lang.Object
it.unimi.dsi.fastutil.longs.AbstractLongIterator
it.unimi.dsi.fastutil.longs.AbstractLongBidirectionalIterator
it.unimi.dsi.fastutil.longs.AbstractLongListIterator
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
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
LongIterators.EmptyIterator
protected LongIterators.EmptyIterator()
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.