Oracle® Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.2.1.3.0)

E80355-01

MappedSet Class Reference

#include <coherence/util/MappedSet.hpp>

Inherits MapKeySet.

Inherited by HashSet, SafeHashSet, and TreeSet.

List of all members.


Detailed Description

Set implementation which is backed by a Map.

Public Types

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

Public Member Functions

virtual bool add (Object::Holder oh)
 Add the given element to this collection.

Parameters:
oh the element to add
Returns:
true iff this collection was modified as a result of this operation

virtual bool addAll (Collection::View vCol)
 Add all elements from the supplied collection to this collection.

Parameters:
vCol the collection of elements to add
Returns:
true iff this collection was modified as a result of this operation
Exceptions:
coherence::lang::NullPointerException if the specified collection is NULL
See also:
add()

virtual Iterator::Handle iterator () const
 Return an Iterator over this collection.

Returns:
an Iterator over this collection

virtual Muterator::Handle iterator ()
 Return an Iterator over this collection.

Returns:
an Iterator over this collection

virtual
ObjectArray::Handle 
toArray (ObjectArray::Handle hoa=NULL) const
 Return the contents of this collection as an ObjectArray.

If the collection fits in the specified array, it is returned, otherwise, a new array is allocated that is the size of this collection.

If this collection fits in the array with additional room then the element in the array immediately following the end of the collection is set to NULL. This can be useful in determining the length of this collection if the caller knows that the collection does not contain any NULL elements.

Parameters:
hao an array in which to store the collection's contents
Returns:
a ObjectArray containing all the elements of the collection in the same order as returned by the collection's Iterator
See also:
Iterator


Protected Member Functions

 MappedSet (Map::Handle hMap)
 Return a new MappedSet backed by the supplied Map.
 MappedSet (Map::View vMap)
 Return a new MappedSet backed by the supplied Map.
 MappedSet (const MappedSet &that)
 Copy constructor.

Constructor & Destructor Documentation

MappedSet ( Map::Handle  hMap  )  [protected]

Return a new MappedSet backed by the supplied Map.

Parameters:
hMap the map to use as storage

MappedSet ( Map::View  vMap  )  [protected]

Return a new MappedSet backed by the supplied Map.

Parameters:
vMap the map to use as storage


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