Oracle Coherence for C++ API
Release 3.7.1.0

E22845-01

TypedCollections::TypedCollection Class Template Reference

#include <coherence/util/TypedCollections.hpp>

Inherits WrapperCollections::AbstractWrapperCollection.

List of all members.


Detailed Description

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

Typed wrapper over Collection interface.

 

Public Types

typedef spec::Handle  Handle
  TypedCollection<T> Handle definition.
typedef spec::View  View
  TypedCollection<T> View definition.
typedef spec::Holder  Holder
  TypedCollection<T> Holder definition.
typedef T  ValueType
  The type of the objects stored in this collection, that e.g.
typedef
TypedIterator< T > 
Iterator
  The type of the iterator over this collection.

Public Member Functions

virtual
TypedCollection::Iterator::Handle 
iteratorTyped () const
  The typed version of the method Collection::iterator.
virtual
TypedCollection::Iterator::Handle 
iteratorTyped ()
  The typed version of the method Collection::iterator.
virtual
coherence::util::Iterator::Handle 
iterator () const
  Return an Iterator over this collection.
Returns:
an Iterator over this collection
virtual
coherence::util::Muterator::Handle 
iterator ()
  Return an Iterator over this collection.
Returns:
an Iterator over this collection
virtual bool  contains (ValueType v) const
  The typed version of the method Collection::contains.
virtual bool  add (ValueType v)
  The typed version of the method Collection::add.
virtual bool  remove (ValueType v)
  The typed version of the method Collection::remove.
virtual bool  addAll (typename TypedCollection::View vtc)
  The typed version of the method Collection::addAll.
virtual bool  removeAll (typename TypedCollection::View vtc)
  The typed version of the method Collection::removeAll.
virtual bool  retainAll (typename TypedCollection::View vtc)
  The typed version of the method Collection::retainAll.

Protected Member Functions

  TypedCollection (Collection::Holder ohCollDelegate)
  Create a new TypedCollection over the given Collection.
  TypedCollection (const TypedCollection &that)
  Copy constructor.

Member Typedef Documentation

typedef T ValueType

The type of the objects stored in this collection, that e.g.

String::View.


Constructor & Destructor Documentation

TypedCollection ( Collection::Holder  ohCollDelegate  )  [inline, protected]

Create a new TypedCollection over the given Collection.

Parameters:
  ohCollDelegate  the Collection to delegate to

Member Function Documentation

virtual TypedCollection::Iterator::Handle iteratorTyped (    )  const [inline, virtual]

The typed version of the method Collection::iterator.

Return a handle to an TypedIterator over the elements in this collection.

Returns:
a TypedIterator over the elements in this collection

virtual TypedCollection::Iterator::Handle iteratorTyped (    )  [inline, virtual]

The typed version of the method Collection::iterator.

Return a handle to an TypedIterator over the elements in this collection.

Returns:
a TypedIterator over the elements in this collection

virtual bool contains ( ValueType  v  )  const [inline, virtual]

The typed version of the method Collection::contains.

Return true if this collection contains the specified element.

Parameters:
  v  element whose presence in this collection is to be tested
Returns:
true if this collection contains the specified element

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

The typed version of the method Collection::add.

Ensure that this collection contains the specified element.

Parameters:
  v  element whose presence in this collection is to be ensured
Returns:
true if this collection changed as a result of the call
Exceptions:
  coherence::lang::UnsupportedOperationException  if the add() operation is not supported by this collection

virtual bool remove ( ValueType  v  )  [inline, virtual]

The typed version of the method Collection::remove.

Remove a single instance of the specified element from this collection, if it is present.

Parameters:
  v  element to be removed from this collection, if present
Returns:
true if this collection changed as a result of the call
Exceptions:
  coherence::lang::UnsupportedOperationException  if the remove() operation is not supported by this collection

virtual bool addAll ( typename TypedCollection< T >::View  vtc  )  [inline, virtual]

The typed version of the method Collection::addAll.

Add all of the elements in the specified collection to this collection.

Parameters:
  vtc  TypedCollection of elements to be inserted into this collection
Returns:
true if this collection changed as a result of the call
Exceptions:
  coherence::lang::NullPointerException  if the specified collection is NULL
  coherence::lang::UnsupportedOperationException  if the add() operation is not supported by this collection

Reimplemented from WrapperCollections::AbstractWrapperCollection.

virtual bool removeAll ( typename TypedCollection< T >::View  vtc  )  [inline, virtual]

The typed version of the method Collection::removeAll.

Remove all this collection's elements that are also contained in the specified typed collection.

Parameters:
  vtc  elements to be removed from this collection
Returns:
true if this collection changed as a result of the call
Exceptions:
  coherence::lang::NullPointerException  if the specified collection is NULL
  coherence::lang::UnsupportedOperationException  if the remove() operation is not supported by this collection

Reimplemented from WrapperCollections::AbstractWrapperCollection.

virtual bool retainAll ( typename TypedCollection< T >::View  vtc  )  [inline, virtual]

The typed version of the method Collection::retainAll.

Retain only the elements in this collection that are contained in the specified typed collection.

Parameters:
  vtc  elements to be retained in this collection
Returns:
true if this collection changed as a result of the call
Exceptions:
  coherence::lang::NullPointerException  if the specified collection is NULL
  coherence::lang::UnsupportedOperationException  if the remove() operation is not supported by this collection

Reimplemented from WrapperCollections::AbstractWrapperCollection.


The documentation for this class was generated from the following file:

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