Oracle Coherence for C++ API
Release 3.6.1.0
E18813-01

- Main Page
- Namespaces
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# TypedCollections::TypedSet Class Template Reference

`#include <coherence/util/TypedCollections.hpp>`

Inherits WrapperCollections::AbstractWrapperSet.

List of all members.

## Detailed Description

### template<class T>
class coherence::util::TypedCollections::TypedSet< T >

Typed wrapper over Set interface.

## Public Types
typedef spec::Handle | Handle
| TypedSet<T> Handle definition.
typedef spec::View | View
| TypedSet<T> View definition.
typedef spec::Holder | Holder
| TypedSet<T> Holder definition.
typedef T | ValueType
| The type of the objects stored in this set, that e.g.
typedef TypedIterator< T > | Iterator
| The type of the iterator over this set.
## Public Member Functions
virtual bool | contains (ValueType v) const
| The typed version of the method Collection::contains.
virtual TypedSet::Iterator::Handle | iteratorTyped () const
| The typed version of the method Collection::iterator.
virtual TypedSet::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 | add (ValueType v)
| The typed version of the method Set::add.
virtual bool | remove (ValueType v)
| The typed version of the method Collection::remove.
virtual bool | addAll (typename TypedCollection< ValueType >::View vtc)
| The typed version of the method Collection::addAll.
virtual bool | addAll (typename TypedCollection< ValueType >::Handle htc)
| The typed version of the method Collection::addAll.
virtual bool | addAll (typename TypedSet< ValueType >::View vts)
| The typed version of the method Collection::addAll.
virtual bool | addAll (typename TypedSet< ValueType >::Handle hts)
| The typed version of the method Collection::addAll.
virtual bool | removeAll (typename TypedCollection< ValueType >::View vtc)
| The typed version of the method Collection::removeAll.
virtual bool | removeAll (typename TypedCollection< ValueType >::Handle htc)
| The typed version of the method Collection::removeAll.
virtual bool | removeAll (typename TypedSet< ValueType >::View vts)
| The typed version of the method Collection::removeAll.
virtual bool | removeAll (typename TypedSet< ValueType >::Handle hts)
| The typed version of the method Collection::removeAll.
virtual bool | retainAll (typename TypedCollection< ValueType >::View vtc)
| The typed version of the method Collection::retainAll.
virtual bool | retainAll (typename TypedCollection< ValueType >::Handle htc)
| The typed version of the method Collection::retainAll.
virtual bool | retainAll (typename TypedSet< ValueType >::View vts)
| The typed version of the method Collection::retainAll.
virtual bool | retainAll (typename TypedSet< ValueType >::Handle hts)
| The typed version of the method Collection::retainAll.
virtual TypedCollection < ValueType > ::Handle | asTypedCollection ()
| Convert a TypedSet to a TypedCollection, wrapping the same underlying Collection::Handle.
virtual TypedCollection < ValueType >::View | asTypedCollection () const
| Convert a TypedSet to a TypedCollection, wrapping the same underlying Collection::View.
## Protected Member Functions
| TypedSet (Set::Holder ohSetDelegate)
| Create a new TypedSet over the given Set.
| TypedSet (const TypedSet &that)
| Copy constructor.

## Member Typedef Documentation

typedef T ValueType

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

String::View.

## Constructor & Destructor Documentation

TypedSet | ( | Set::Holder | ohSetDelegate | ) | `[inline, protected]`

Create a new TypedSet over the given Set.

Parameters:

  | ohSetDelegate | the Set to delegate to

## Member Function Documentation

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

The typed version of the method Collection::contains.

Return true if this set contains the specified element.

Parameters:

  | v | element whose presence in this set is to be tested

Returns:
  true if this collection contains the specified element

virtual TypedSet::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 set.

Returns:
  a TypedIterator over the elements in this set

virtual TypedSet::Iterator::Handle iteratorTyped | ( |  | ) | `[inline, virtual]`

The typed version of the method Collection::iterator.

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

Returns:
  a TypedIterator over the elements in this set

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

The typed version of the method Set::add.

Add the specified element to this set if it is not already present.

Parameters:

  | v | element to be added to this set.

Returns:
  true if this set changed as a result of the call

Exceptions:

  | coherence::lang::UnsupportedOperationException | if the add() operation is not supported by this set

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

The typed version of the method Collection::remove.

Remove the specified element from this set, if it is present.

Parameters:

  | v | element to be removed from this set, if present

Returns:
  true if this set changed as a result of the call

Exceptions:

  | coherence::lang::UnsupportedOperationException | if the remove() operation is not supported by this set

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

The typed version of the method Collection::addAll.

Add all of the elements in the specified TypedCollection to this set.

Parameters:

  | vtc | TypedCollection of elements to be inserted into this set

Returns:
  true if this set 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 set

virtual bool addAll | ( | typename TypedCollection< ValueType >::Handle | htc | ) | `[inline, virtual]`

The typed version of the method Collection::addAll.

Add all of the elements in the specified TypedCollection to this set.

Parameters:

  | htc | TypedCollection of elements to be inserted into this set

Returns:
  true if this set 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 set

virtual bool addAll | ( | typename TypedSet< ValueType >::View | vts | ) | `[inline, virtual]`

The typed version of the method Collection::addAll.

Add all of the elements in the specified TypedSet to this set.

Parameters:

  | vts | TypedSet of elements to be inserted into this set

Returns:
  true if this set 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 set

virtual bool addAll | ( | typename TypedSet< ValueType >::Handle | hts | ) | `[inline, virtual]`

The typed version of the method Collection::addAll.

Add all of the elements in the specified TypedSet to this set.

Parameters:

  | hts | TypedSet of elements to be inserted into this set

Returns:
  true if this set 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 set

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

The typed version of the method Collection::removeAll.

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

Parameters:

  | vtc | elements to be removed from this set

Returns:
  true if this set 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 set

virtual bool removeAll | ( | typename TypedCollection< ValueType >::Handle | htc | ) | `[inline, virtual]`

The typed version of the method Collection::removeAll.

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

Parameters:

  | htc | elements to be removed from this set

Returns:
  true if this set 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 set

virtual bool removeAll | ( | typename TypedSet< ValueType >::View | vts | ) | `[inline, virtual]`

The typed version of the method Collection::removeAll.

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

Parameters:

  | vts | elements to be removed from this set

Returns:
  true if this set 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 set

virtual bool removeAll | ( | typename TypedSet< ValueType >::Handle | hts | ) | `[inline, virtual]`

The typed version of the method Collection::removeAll.

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

Parameters:

  | hts | elements to be removed from this set

Returns:
  true if this set 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 set

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

The typed version of the method Collection::retainAll.

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

Parameters:

  | vtc | elements to be retained in this set

Returns:
  true if this set 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 set

virtual bool retainAll | ( | typename TypedCollection< ValueType >::Handle | htc | ) | `[inline, virtual]`

The typed version of the method Collection::retainAll.

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

Parameters:

  | htc | elements to be retained in this set

Returns:
  true if this set 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 set

virtual bool retainAll | ( | typename TypedSet< ValueType >::View | vts | ) | `[inline, virtual]`

The typed version of the method Collection::retainAll.

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

Parameters:

  | vts | elements to be retained in this set

Returns:
  true if this set 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 set

virtual bool retainAll | ( | typename TypedSet< ValueType >::Handle | hts | ) | `[inline, virtual]`

The typed version of the method Collection::retainAll.

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

Parameters:

  | hts | elements to be retained in this set

Returns:
  true if this set 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 set

virtual TypedCollection<ValueType>::Handle asTypedCollection | ( |  | ) | `[inline, virtual]`

Convert a TypedSet to a TypedCollection, wrapping the same underlying Collection::Handle.

Returns:
  a handle to the new TypedCollection

virtual TypedCollection<ValueType>::View asTypedCollection | ( |  | ) | const`[inline, virtual]`

Convert a TypedSet to a TypedCollection, wrapping the same underlying Collection::View.

Returns:
  a view to the new TypedCollection

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

- coherence/util/TypedCollections.hpp

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