com.neeve.util
Class UtlLinkedLongMap.FastIterator
java.lang.Object
com.neeve.util.UtlLinkedLongMap.FastIterator
- All Implemented Interfaces:
- Iterator<UtlLinkedLongMap.Entry<V>>, ListIterator<UtlLinkedLongMap.Entry<V>>
- Enclosing class:
- UtlLinkedLongMap<V>
public final class UtlLinkedLongMap.FastIterator
- extends Object
- implements ListIterator<UtlLinkedLongMap.Entry<V>>
This inner class represents a reusable list iterator over
UtlLinkedLongMap
entries. This iterator is bi-directional and can be
directly moved to the first
or last
entry. For example:
for (FastIterator i=map.fastIterator().toFirst(); i.hasNext();) {
Entry entry = i.nextEntry();
...
}
setting
or adding
new entries is not
supported.
UtlLinkedLongMap.FastIterator
public UtlLinkedLongMap.FastIterator()
toFirst
public UtlLinkedLongMap.FastIterator toFirst()
- Resets the iterator to the beginning.
- Returns:
- The FastIterator for invocation chaining.
toLast
public UtlLinkedLongMap.FastIterator toLast()
- Resets the iterator to the last element.
- Returns:
- The FastIterator for invocation chaining.
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator<UtlLinkedLongMap.Entry<V>>
- Specified by:
hasNext
in interface ListIterator<UtlLinkedLongMap.Entry<V>>
nextEntry
public UtlLinkedLongMap.Entry<V> nextEntry()
next
public UtlLinkedLongMap.Entry<V> next()
- Specified by:
next
in interface Iterator<UtlLinkedLongMap.Entry<V>>
- Specified by:
next
in interface ListIterator<UtlLinkedLongMap.Entry<V>>
hasPrevious
public boolean hasPrevious()
- Specified by:
hasPrevious
in interface ListIterator<UtlLinkedLongMap.Entry<V>>
previousEntry
public UtlLinkedLongMap.Entry<V> previousEntry()
previous
public UtlLinkedLongMap.Entry<V> previous()
- Specified by:
previous
in interface ListIterator<UtlLinkedLongMap.Entry<V>>
nextIndex
public int nextIndex()
- Specified by:
nextIndex
in interface ListIterator<UtlLinkedLongMap.Entry<V>>
previousIndex
public int previousIndex()
- Specified by:
previousIndex
in interface ListIterator<UtlLinkedLongMap.Entry<V>>
remove
public void remove()
- Specified by:
remove
in interface Iterator<UtlLinkedLongMap.Entry<V>>
- Specified by:
remove
in interface ListIterator<UtlLinkedLongMap.Entry<V>>
set
public void set(UtlLinkedLongMap.Entry<V> o)
- Specified by:
set
in interface ListIterator<UtlLinkedLongMap.Entry<V>>
add
public void add(UtlLinkedLongMap.Entry<V> o)
- Specified by:
add
in interface ListIterator<UtlLinkedLongMap.Entry<V>>
Copyright © 2016 Neeve Research, LLC. All Rights Reserved.