com.neeve.util
Class UtlLinkedLongMap.FastIterator

java.lang.Object
  extended by 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.


Constructor Summary
UtlLinkedLongMap.FastIterator()
           
 
Method Summary
 void add(UtlLinkedLongMap.Entry<V> o)
           
 boolean hasNext()
           
 boolean hasPrevious()
           
 UtlLinkedLongMap.Entry<V> next()
           
 UtlLinkedLongMap.Entry<V> nextEntry()
           
 int nextIndex()
           
 UtlLinkedLongMap.Entry<V> previous()
           
 UtlLinkedLongMap.Entry<V> previousEntry()
           
 int previousIndex()
           
 void remove()
           
 void set(UtlLinkedLongMap.Entry<V> o)
           
 UtlLinkedLongMap.FastIterator toFirst()
          Resets the iterator to the beginning.
 UtlLinkedLongMap.FastIterator toLast()
          Resets the iterator to the last element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UtlLinkedLongMap.FastIterator

public UtlLinkedLongMap.FastIterator()
Method Detail

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.