Oracle Coherence for C++ API
Release 3.7.1.0

E22845-01

TypedCollections::TypedListIterator Class Template Reference

#include <coherence/util/TypedCollections.hpp>

Inherits WrapperCollections::AbstractWrapperListIterator.

List of all members.


Detailed Description

template<class T>
class coherence::util::TypedCollections::TypedListIterator< T >

Typed wrapper over ListIterator interface.
 

Public Types

typedef spec::Handle Handle
 TypedListIterator<T> Handle definition.
typedef spec::View View
 TypedListIterator<T> View definition.
typedef spec::Holder Holder
 TypedListIterator<T> Holder definition.
typedef T ValueType
 The type of the handles returned by this iterator, e.g.

Public Member Functions

virtual ValueType nextTyped ()
 The typed version of the method Iterator::next.
virtual ValueType previousTyped ()
 The typed version of the method ListIterator::previous.
virtual void add (ValueType v)
 The typed version of the method ListIterator::add.
virtual void set (ValueType v)
 The typed version of the method ListIterator::set.

Protected Member Functions

 TypedListIterator (ListIterator::Handle hIterDelegate)
 Create a new TypedListIterator over the given ListIterator.
 TypedListIterator (const TypedListIterator &that)
 Copy constructor.

Member Typedef Documentation

typedef T ValueType

The type of the handles returned by this iterator, e.g.

String::View.


Constructor & Destructor Documentation

TypedListIterator ( ListIterator::Handle  hIterDelegate  )  [inline, protected]

Create a new TypedListIterator over the given ListIterator.

Parameters:
 hIterDelegate a general "Object" Iterator to wrap around


Member Function Documentation

virtual ValueType nextTyped (  )  [inline, virtual]

The typed version of the method Iterator::next.

Return the next element in the iteration.

Returns:
the next element in the iteration.
Exceptions:
 coherence::lang::NoSuchElementException if iteration has no more elements.
 ClassCastException if the typed collection is broken by external usage

virtual ValueType previousTyped (  )  [inline, virtual]

The typed version of the method ListIterator::previous.

Return the previous element in the iteration.

Returns:
the previous element in the iteration.
Exceptions:
 coherence::lang::NoSuchElementException if iteration has no previous elements.
 ClassCastException if the typed collection is broken by external usage

virtual void add ( ValueType  v  )  [inline, virtual]

The typed version of the method ListIterator::add.

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:
 v the element to add
Exceptions:
 UnsupportedOperationException if addition is not supported

virtual void set ( ValueType  v  )  [inline, virtual]

The typed version of the method ListIterator::set.

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


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