Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.1.0 E18814-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.util
Class CopyOnWriteLongArray.UnmodifiableIterator

`java.lang.Object
com.tangosol.util.CopyOnWriteLongArray.UnmodifiableIterator`

All Implemented Interfaces:
  LongArray.Iterator, java.util.Iterator

Enclosing class:
  CopyOnWriteLongArray

      public static class CopyOnWriteLongArray.UnmodifiableIterator

extends java.lang.Object
implements LongArray.Iterator

Unmodifiable view of a LongArray.Iterator.

Field Summary
`protected LongArray.Iterator` | `m_iteratorInternal` The internal Iterator

Constructor Summary
`CopyOnWriteLongArray.UnmodifiableIterator(LongArray.Iterator iterator)` Construct a wrapper for the specified Iterator.

Method Summary
`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` | `getInternalIterator()` Return the internal Iterator.
`java.lang.Object` | `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.
`java.lang.Object` | `next()` Returns the next element in the iteration.
`void` | `remove()` Removes from the underlying collection the last element returned by the iterator (optional operation).
`java.lang.Object` | `setValue(java.lang.Object oValue)` Stores a new value at the current value index, returning the value that was replaced.

Field Detail

### m_iteratorInternal

    protected LongArray.Iterator m_iteratorInternal

  The internal Iterator

Constructor Detail

### CopyOnWriteLongArray.UnmodifiableIterator

    public CopyOnWriteLongArray.UnmodifiableIterator(LongArray.Iterator iterator)

  Construct a wrapper for the specified Iterator.
  Parameters:
    `iterator` - the iterator to create a wrapper for

Method Detail

### getInternalIterator

    public LongArray.Iterator getInternalIterator()

  Return the internal Iterator.
  Returns:
    the internal Iterator

### hasNext

    public boolean hasNext()

  Returns `true` if the iteration has more elements. (In other words, returns `true` if `next` would return an element rather than throwing an exception.)
  Specified by:
    `hasNext` in interface `LongArray.Iterator`
  Specified by:
    `hasNext` in interface `java.util.Iterator`
  Returns:
    `true` if the iterator has more elements

### next

    public java.lang.Object next()

  Returns the next element in the iteration.
  Specified by:
    `next` in interface `LongArray.Iterator`
  Specified by:
    `next` in interface `java.util.Iterator`
  Returns:
    the next element in the iteration

### getIndex

    public long getIndex()

  Returns the index of the current value, which is the value returned by the most recent call to the `next` method.
  Specified by:
    `getIndex` in interface `LongArray.Iterator`

### getValue

    public java.lang.Object 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.
  Specified by:
    `getValue` in interface `LongArray.Iterator`
  Returns:
    the current value

### setValue

    public java.lang.Object setValue(java.lang.Object oValue)

  Stores a new value at the current value index, returning the value that was replaced. The index of the current value is obtainable by calling the `getIndex` method.
  Specified by:
    `setValue` in interface `LongArray.Iterator`
  Returns:
    the replaced value

### remove

    public void remove()

  Removes from the underlying collection the last element returned by the iterator (optional operation). This method can be called only once per call to `next`. The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method.
  Specified by:
    `remove` in interface `LongArray.Iterator`
  Specified by:
    `remove` in interface `java.util.Iterator`

Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.1.0 E18814-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.