public static class CopyOnWriteLongArray.UnmodifiableIterator<V> extends Object implements LongArray.Iterator<V>
Modifier and Type | Field and Description |
---|---|
protected LongArray.Iterator<V> |
m_iteratorInternal
The internal Iterator
|
Constructor and Description |
---|
UnmodifiableIterator(LongArray.Iterator<V> iterator)
Construct a wrapper for the specified Iterator.
|
Modifier and Type | Method and Description |
---|---|
long |
getIndex()
Returns the index of the current value, which is the value returned
by the most recent call to the next method.
|
LongArray.Iterator<V> |
getInternalIterator()
Return the internal Iterator.
|
V |
getValue()
Returns the current value, which is the same value returned by the
most recent call to the next method, or the most recent
value passed to setValue if setValue were called
after the next method.
|
boolean |
hasNext()
Returns true if the iteration has more elements.
|
V |
next()
Returns the next element in the iteration.
|
void |
remove()
Removes from the underlying collection the last element returned by
the iterator (optional operation).
|
V |
setValue(V oValue)
Stores a new value at the current value index, returning the value
that was replaced.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
protected LongArray.Iterator<V> m_iteratorInternal
public UnmodifiableIterator(LongArray.Iterator<V> iterator)
iterator
- the iterator to create a wrapper forpublic LongArray.Iterator<V> getInternalIterator()
public boolean hasNext()
public V next()
public long getIndex()
getIndex
in interface LongArray.Iterator<V>
public V getValue()
getValue
in interface LongArray.Iterator<V>
public V setValue(V oValue)
setValue
in interface LongArray.Iterator<V>
oValue
- the new value to storepublic void remove()