it.unimi.dsi.fastutil.shorts
Class ShortIterators.EmptyIterator
java.lang.Object
it.unimi.dsi.fastutil.shorts.AbstractShortIterator
it.unimi.dsi.fastutil.shorts.AbstractShortBidirectionalIterator
it.unimi.dsi.fastutil.shorts.AbstractShortListIterator
it.unimi.dsi.fastutil.shorts.ShortIterators.EmptyIterator
- All Implemented Interfaces:
- BidirectionalIterator<Short>, ObjectBidirectionalIterator<Short>, ObjectIterator<Short>, ShortBidirectionalIterator, ShortIterator, ShortListIterator, Serializable, Cloneable, Iterator<Short>, ListIterator<Short>
- Enclosing class:
- ShortIterators
public static class ShortIterators.EmptyIterator
- extends AbstractShortListIterator
- 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
ShortIterators.EmptyIterator
protected ShortIterators.EmptyIterator()
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<Short>- Specified by:
hasNext in interface ListIterator<Short>
hasPrevious
public boolean hasPrevious()
- Description copied from interface:
BidirectionalIterator
- Returns whether there is a previous element.
- Specified by:
hasPrevious in interface BidirectionalIterator<Short>- Specified by:
hasPrevious in interface ListIterator<Short>
- Returns:
- whether there is a previous element.
- See Also:
ListIterator.hasPrevious()
nextShort
public short nextShort()
- Description copied from class:
AbstractShortIterator
- Delegates to the corresponding generic method.
- Specified by:
nextShort in interface ShortIterator- Overrides:
nextShort in class AbstractShortIterator
- Returns:
- the next element in the iteration.
- See Also:
Iterator.next()
previousShort
public short previousShort()
- Description copied from class:
AbstractShortBidirectionalIterator
- Delegates to the corresponding generic method.
- Specified by:
previousShort in interface ShortBidirectionalIterator- Overrides:
previousShort in class AbstractShortBidirectionalIterator
- Returns:
- the previous element in the iteration.
- See Also:
ListIterator.previous()
nextIndex
public int nextIndex()
- Specified by:
nextIndex in interface ListIterator<Short>
previousIndex
public int previousIndex()
- Specified by:
previousIndex in interface ListIterator<Short>
skip
public int skip(int n)
- Description copied from class:
AbstractShortIterator
- This method just iterates the type-specific version of
AbstractShortIterator.next() for at most
n times, stopping if Iterator.hasNext() becomes false.
- Specified by:
skip in interface ObjectIterator<Short>- Specified by:
skip in interface ShortIterator- Overrides:
skip in class AbstractShortIterator
- 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:
AbstractShortBidirectionalIterator
- This method just iterates the type-specific version of
AbstractShortBidirectionalIterator.previous() for
at most n times, stopping if BidirectionalIterator.hasPrevious() becomes false.
- Specified by:
back in interface ObjectBidirectionalIterator<Short>- Specified by:
back in interface ShortBidirectionalIterator- Overrides:
back in class AbstractShortBidirectionalIterator
- 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.