Oracle Coherence for C++ API
Release 3.7.1.0

E22845-01

PofHelper::WriteableEntrySetMap Class Reference

#include <coherence/io/pof/PofHelper.hpp>

Inherits AbstractMap.

List of all members.


Detailed Description

Immutable Map implementation backed by a Set of Map::Entry objects.

Author:
jh 2008.05.05
 

Public Types

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

Public Member Functions

virtual Object::Holder put (Object::View vKey, Object::Holder ohValue)
 Associate the specified value with the specified key in this map.

If the map previously contained a mapping for this key, the old value is replaced by the specified value.

Parameters:
 vKey key with which the specified value is to be associated.
 ohValue value to be associated with the specified key.
Returns:
previous value associated with specified key, or NULL if there was no mapping for key. A NULL return can also indicate that the map previously associated NULL with the specified key.
Exceptions:
 coherence::lang::UnsupportedOperationException if the put() operation is not supported by this map.
virtual Object::Holder remove (Object::View vKey)
 Remove the mapping for this key from this map if it is present.

Return the value to which the map previously associated the key, or NULL if the map contained no mapping for this key. (A NULL return can also indicate that the map previously associated NULL with the specified key.) The map will not contain a mapping for the specified key once the call returns.

Parameters:
 vKey key whose mapping is to be removed from the map.
Returns:
previous value associated with specified key, or NULL if there was no mapping for key.
Exceptions:
 coherence::lang::UnsupportedOperationException if the remove() operation is not supported by this map.
virtual void clear ()
 Remove all mappings from this map.

Exceptions:
 coherence::lang::UnsupportedOperationException if the clear()operation is not supported by this map.
virtual Set::Handle entrySet ()
 Return a set of the mappings contained in this map.

Each element in the returned set is a Map::Entry::Handle. The set is backed by the map, so changes to one are reflected in the other. If the map is modified while an iteration over the set is in progress, the results of the iteration are undefined.

Returns:
a set of the mappings contained in this map.
virtual Set::View entrySet () const
 Return a set of the mappings contained in this map.

Each element in the returned set is a Map::Entry::View. The set is backed by the map, so changes to the map are reflected in the set. If the map is modified while an iteration over the set is in progress, the results of the iteration are undefined.

Returns:
a set of the mappings contained in this map.

Protected Member Functions

 WriteableEntrySetMap (Set::View vSetEntries)
 Construct a new WriteableEntrySetMap that is backed by the given Set of Map::Entry objects.

Protected Attributes

FinalView< Setm_vSetEntries
 The backing Set of Map::Entry objects.

Constructor & Destructor Documentation

WriteableEntrySetMap ( Set::View  vSetEntries  )  [protected]

Construct a new WriteableEntrySetMap that is backed by the given Set of Map::Entry objects.

Parameters:
 vSetEntries a Set of Map::Entry objects in the new WriteableEntrySetMap; must not be NULL


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