Oracle Coherence for C++ API
Release 3.6.1.0

E18813-01

WrapperCollections::AbstractWrapperListIterator Class Reference

#include <coherence/util/WrapperCollections.hpp>

Inherits WrapperCollections::AbstractWrapperIterator, and ListMuterator.

Inherited by TypedCollections::TypedListIterator.

List of all members.


Detailed Description

ListIterator implementation which delegates all calls to another ListIterator.

Public Types

typedef spec::Handle  Handle
  AbstractWrapperListIterator Handle definition.
typedef spec::View  View
  AbstractWrapperListIterator View definition.
typedef spec::Holder  Holder
  AbstractWrapperListIterator Holder definition.

Public Member Functions

virtual bool  hasPrevious () const
  Returns true if this list iterator has more elements when traversing the list in the reverse direction.
Returns:
true if this list iterator has more elements when traversing the list in the reverse direction

virtual Object::Holder  previous ()
  Returns the previous element in the list.
Returns:
the previous element in the list

virtual size32_t  nextIndex () const
  Return the index of the next element to be returned from a call to next().
Returns:
the index of the next element, or the list size if the iterator has reached the end of the list

virtual size32_t  previousIndex () const
  Return the index of the element to be returned from a call to previous().
Returns:
the index of the element that would be returned from a call to previous, or List::npos if the iterator is at the start of the list.

virtual void  remove ()
  Remove from the collection associated with this iterator, the last element returned from the iterator.
Exceptions:
UnsupportedOperationException  if removal is not supported

virtual void  add (Object::Holder oh)
  Insert the specified element immediately before the element to be returned from the next call to the next() method.

A subsequent call to next() will not return the added element, while a call to previous() would return the added element.

Parameters:
oh  the element to add
Exceptions:
UnsupportedOperationException  if addition is not supported

virtual void  set (Object::Holder oh)
  Replace the last element returned by next() or previous() with the specified element.
Parameters:
oh  the element to store
Exceptions:
UnsupportedOperationException  if set is not supported

virtual bool  hasNext () const
  Determine if the iteration has another element.
Returns:
true if the iterator has another element

virtual Object::Holder  next ()
  Return the next element in the iterated series.
Returns:
the next element in the iterated series
Exceptions:
coherence::lang::NoSuchElementException  if iteration has no more elements


Protected Member Functions

  AbstractWrapperListIterator (ListIterator::Handle hIterDelegate)
  Create an AbstractWrapperListIterator which delegates to the specified ListIterator.
  AbstractWrapperListIterator (const AbstractWrapperListIterator &that)
  Copy constructor.
virtual
ListIterator::Handle 
getListDelegate ()
  Return a handle to the delegate.
virtual
ListIterator::View 
getListDelegate () const
  Return a view to the delegate.

Constructor & Destructor Documentation

AbstractWrapperListIterator ( ListIterator::Handle  hIterDelegate  )  [protected]

Create an AbstractWrapperListIterator which delegates to the specified ListIterator.

Parameters:
hIterDelegate  the Iterator to delegate to

Member Function Documentation

virtual ListIterator::Handle getListDelegate (  )  [protected, virtual]

Return a handle to the delegate.

Returns:
the delegate handle
Exceptions:
UnsupportedOperationException  if the delegate is a view

virtual ListIterator::View getListDelegate (  )  const [protected, virtual]

Return a view to the delegate.

Returns:
the delegate view

The documentation for this class was generated from the following file:
Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.