it.unimi.dsi.fastutil.objects
Class ObjectIterators.EmptyIterator<K>
java.lang.Object
it.unimi.dsi.fastutil.objects.AbstractObjectIterator<K>
it.unimi.dsi.fastutil.objects.AbstractObjectBidirectionalIterator<K>
it.unimi.dsi.fastutil.objects.AbstractObjectListIterator<K>
it.unimi.dsi.fastutil.objects.ObjectIterators.EmptyIterator<K>
- All Implemented Interfaces:
- BidirectionalIterator<K>, ObjectBidirectionalIterator<K>, ObjectIterator<K>, ObjectListIterator<K>, Serializable, Cloneable, Iterator<K>, ListIterator<K>
- Enclosing class:
- ObjectIterators
public static class ObjectIterators.EmptyIterator<K>
- extends AbstractObjectListIterator<K>
- 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
ObjectIterators.EmptyIterator
protected ObjectIterators.EmptyIterator()
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator<K>
- Specified by:
hasNext
in interface ListIterator<K>
hasPrevious
public boolean hasPrevious()
- Description copied from interface:
BidirectionalIterator
- Returns whether there is a previous element.
- Specified by:
hasPrevious
in interface BidirectionalIterator<K>
- Specified by:
hasPrevious
in interface ListIterator<K>
- Returns:
- whether there is a previous element.
- See Also:
ListIterator.hasPrevious()
next
public K next()
- Specified by:
next
in interface Iterator<K>
- Specified by:
next
in interface ListIterator<K>
previous
public K previous()
- Description copied from interface:
BidirectionalIterator
- Returns the previous element from the collection.
- Specified by:
previous
in interface BidirectionalIterator<K>
- Specified by:
previous
in interface ListIterator<K>
- Returns:
- the previous element from the collection.
- See Also:
ListIterator.previous()
nextIndex
public int nextIndex()
- Specified by:
nextIndex
in interface ListIterator<K>
previousIndex
public int previousIndex()
- Specified by:
previousIndex
in interface ListIterator<K>
skip
public int skip(int n)
- Description copied from class:
AbstractObjectIterator
- This method just iterates the type-specific version of
Iterator.next()
for at most
n
times, stopping if Iterator.hasNext()
becomes false.
- Specified by:
skip
in interface ObjectIterator<K>
- Overrides:
skip
in class AbstractObjectIterator<K>
- 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:
AbstractObjectBidirectionalIterator
- This method just iterates the type-specific version of
BidirectionalIterator.previous()
for
at most n
times, stopping if BidirectionalIterator.hasPrevious()
becomes false.
- Specified by:
back
in interface ObjectBidirectionalIterator<K>
- Overrides:
back
in class AbstractObjectBidirectionalIterator<K>
- 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.