Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.util
Class ConverterCollections.ConverterListIterator

    java.lang.Object
      com.tangosol.util.Base
          com.tangosol.util.ConverterCollections.ConverterListIterator

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

Enclosing class:
  ConverterCollections

    public static class ConverterCollections.ConverterListIterator

extends Base
implements java.util.ListIterator

A Converter ListIterator views an underlying ListIterator through a Converter.

Field Summary
`protected Converter` | `m_convDown` The Converter from this ListIterator to the underlying ListIterator.
`protected Converter` | `m_convUp` The Converter from the underlying ListIterator to this ListIterator.
`protected java.util.ListIterator` | `m_iter` The underlying ListIterator.

Constructor Summary
`ConverterCollections.ConverterListIterator(java.util.ListIterator iter, Converter convUp, Converter convDown)` Constructor.

Method Summary
`void` | `add(java.lang.Object o)` Inserts the specified element into the list.
`Converter` | `getConverterDown()` Return the Converter used to pass values down to the underlying ListIterator.
`Converter` | `getConverterUp()` Return the Converter used to view the underlying ListIterator's values through.
`java.util.ListIterator` | `getListIterator()` Return the underlying ListIterator.
`boolean` | `hasNext()` Returns `true` if this list iterator has more elements when traversing the list in the forward direction.
`boolean` | `hasPrevious()` Returns `true` if this list iterator has more elements when traversing the list in the reverse direction.
`java.lang.Object` | `next()` Returns the next element in the list.
`int` | `nextIndex()` Returns the index of the element that would be returned by a subsequent call to `next`.
`java.lang.Object` | `previous()` Returns the previous element in the list.
`int` | `previousIndex()` Returns the index of the element that would be returned by a subsequent call to `previous`.
`void` | `remove()` Removes from the list the last element that was returned by `next` or `previous`.
`void` | `set(java.lang.Object o)` Replaces the last element returned by `next` or `previous` with the specified element.

Field Detail

### m_iter

    protected java.util.ListIterator m_iter

  The underlying ListIterator.

### m_convUp

    protected Converter m_convUp

  The Converter from the underlying ListIterator to this ListIterator.

### m_convDown

    protected Converter m_convDown

  The Converter from this ListIterator to the underlying ListIterator.

Constructor Detail

### ConverterCollections.ConverterListIterator

    public ConverterCollections.ConverterListIterator(java.util.ListIterator iter,
                                                      Converter convUp,
                                                      Converter convDown)

  Constructor.

  Parameters:
    `iter` - the underlying ListIterator
    `convUp` - the Converter from the underlying ListIterator
    `convDown` - the Converter to the underlying ListIterator

Method Detail

### hasNext

    public boolean hasNext()

  Returns `true` if this list iterator has more elements when traversing the list in the forward direction. Obeys the general contract of ListIterator.hasNext.

  Specified by:
    `hasNext` in interface `java.util.Iterator`
  Specified by:
    `hasNext` in interface `java.util.ListIterator`
  Returns:
    `true` if the list iterator has more elements when traversing the list in the forward direction

### next

    public java.lang.Object next()

  Returns the next element in the list. Obeys the general contract of ListIterator.next.

  Specified by:
    `next` in interface `java.util.Iterator`
  Specified by:
    `next` in interface `java.util.ListIterator`
  Returns:
    the next element in the list

### hasPrevious

    public boolean hasPrevious()

  Returns `true` if this list iterator has more elements when traversing the list in the reverse direction. Obeys the general contract of ListIterator.hasPrevious.

  Specified by:
    `hasPrevious` in interface `java.util.ListIterator`
  Returns:
    `true` if the list iterator has more elements when traversing the list in the reverse direction

### previous

    public java.lang.Object previous()

  Returns the previous element in the list. Obeys the general contract of ListIterator.previous.

  Specified by:
    `previous` in interface `java.util.ListIterator`
  Returns:
    the previous element in the list
  Throws:
    `java.util.NoSuchElementException` - if the iteration has no previous element

### nextIndex

    public int nextIndex()

  Returns the index of the element that would be returned by a subsequent call to `next`. Obeys the general contract of ListIterator.nextIndex.

  Specified by:
    `nextIndex` in interface `java.util.ListIterator`
  Returns:
    the index of the element that would be returned by a subsequent call to `next`, or list size if list iterator is at end of list

### previousIndex

    public int previousIndex()

  Returns the index of the element that would be returned by a subsequent call to `previous`. Obeys the general contract of ListIterator.previousIndex.

  Specified by:
    `previousIndex` in interface `java.util.ListIterator`
  Returns:
    the index of the element that would be returned by a subsequent call to `previous`, or -1 if list iterator is at beginning of list

### remove

    public void remove()

  Removes from the list the last element that was returned by `next` or `previous`. Obeys the general contract of ListIterator.remove.

  Specified by:
    `remove` in interface `java.util.Iterator`
  Specified by:
    `remove` in interface `java.util.ListIterator`

### set

    public void set(java.lang.Object o)

  Replaces the last element returned by `next` or `previous` with the specified element. Obeys the general contract of ListIterator.set.

  Specified by:
    `set` in interface `java.util.ListIterator`
  Parameters:
    `o` - the element with which to replace the last element returned by `next` or `previous`

### add

    public void add(java.lang.Object o)

  Inserts the specified element into the list. Obeys the general contract of ListIterator.add.

  Specified by:
    `add` in interface `java.util.ListIterator`
  Parameters:
    `o` - the element to insert

### getListIterator

    public java.util.ListIterator getListIterator()

  Return the underlying ListIterator.

  Returns:
    the underlying ListIterator

### getConverterUp

    public Converter getConverterUp()

  Return the Converter used to view the underlying ListIterator's values through.

  Returns:
    the Converter from the underlying ListIterator

### getConverterDown

    public Converter getConverterDown()

  Return the Converter used to pass values down to the underlying ListIterator.

  Returns:
    the Converter to the underlying ListIterator

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.