#include <coherence/util/TypedCollections.hpp>
Public Types | |
typedef spec::Handle | Handle |
TypedMap<K, V> Handle definition. | |
typedef spec::View | View |
TypedMap<K, V> View definition. | |
typedef spec::Holder | Holder |
TypedMap<K, V> Holder definition. | |
typedef K | KeyType |
The type of the map's keys, e.g. | |
typedef V | ValueType |
The type of the map's values, e.g. | |
typedef TypedEntry < KeyType, ValueType > | Entry |
The type of the entries stored in this map. | |
typedef TypedSet < KeyType > | KeySet |
The type of the key set associated with this map. | |
typedef TypedCollection < ValueType > | ValueCollection |
The type of the values collection associated with this map. | |
typedef TypedSet < typename Entry::View > | EntrySet |
The type of the entry set associated with this map. | |
Public Member Functions | |
virtual bool | containsKey (KeyType vKey) const |
The typed version of the method Map::containsKey. | |
virtual bool | containsValue (ValueType ohValue) const |
The typed version of the method Map::containsValue. | |
virtual ValueType | get (KeyType vKey) const |
The typed version of the method Map::get. | |
virtual ValueType | get (KeyType vKey) |
The typed version of the method Map::get. | |
virtual ValueType | put (KeyType vKey, ValueType ohValue) |
The typed version of the method Map::put. | |
virtual ValueType | remove (KeyType vKey) |
The typed version of the method Map::put. | |
virtual void | putAll (typename TypedMap::View vMap) |
The typed version of the method Map::putAll. | |
virtual KeySet::View | keySetTyped () const |
The typed version of the method Map::keySet. | |
virtual KeySet::Handle | keySetTyped () |
The typed version of the method Map::keySet. | |
virtual Set::View | keySet () const |
virtual Set::Handle | keySet () |
virtual ValueCollection::View | valuesTyped () const |
The typed version of the method Map::values. | |
virtual ValueCollection::Handle | valuesTyped () |
The typed version of the method Map::values. | |
virtual Collection::View | values () const |
virtual Collection::Handle | values () |
virtual EntrySet::View | entrySetTyped () const |
The typed version of the method Map::entrySet. | |
virtual EntrySet::Handle | entrySetTyped () |
The typed version of the method Map::entrySet. | |
virtual Set::View | entrySet () const |
virtual Set::Handle | entrySet () |
Protected Member Functions | |
TypedMap (Map::Holder ohMapDelegate) | |
Create a new TypedMap over the given Map. | |
TypedMap (const TypedMap &that) | |
Copy constructor. | |
Protected Attributes | |
FinalView < EntryConverter > | f_vConverter |
The converter used to convert untyped entries to typed ones. | |
Classes | |
class | EntryConverter |
A converter from untyped to typed entries: Map::Entry -> TypedEntry. More... |
typedef K KeyType |
The type of the map's keys, e.g.
typedef V ValueType |
The type of the map's values, e.g.
TypedMap | ( | Map::Holder | ohMapDelegate | ) | [inline, protected] |
Create a new TypedMap over the given Map.
ohMapDelegate | the Map to delegate to |
virtual bool containsKey | ( | KeyType | vKey | ) | const [inline, virtual] |
The typed version of the method Map::containsKey.
Return true
if this map contains a mapping for the specified key.
vKey | key whose presence in this map is to be tested. |
true
if this map contains a mapping for the specified key. virtual bool containsValue | ( | ValueType | ohValue | ) | const [inline, virtual] |
The typed version of the method Map::containsValue.
Return true
if this map maps one or more keys to the specified value.
ohValue | value whose presence in this map is to be tested. |
true
if this map maps one or more keys to the specified value. The typed version of the method Map::get.
Return the value to which this map maps the specified key, if any.
vKey | key whose associated value is to be returned. |
NULL
if the map contains no mapping for this key.ClassCastException | if the typed map is broken by external usage |
The typed version of the method Map::get.
Return the value to which this map maps the specified key, if any.
vKey | key whose associated value is to be returned. |
NULL
if the map contains no mapping for this key.ClassCastException | if the typed map is broken by external usage |
The typed version of the method Map::put.
Associate the specified value with the specified key in this map.
vKey | key with which the specified value is to be associated. | |
ohValue | value to be associated with the specified key. |
NULL
if there was no mapping for key. A NULL
return can also indicate that the map previously associated NULL
with the specified key.coherence::lang::UnsupportedOperationException | if the put() operation is not supported by this map | |
ClassCastException | if the typed map is broken by external usage |
The typed version of the method Map::put.
Remove the mapping for this key from this map if it is present.
vKey | key whose mapping is to be removed from the map. |
NULL
if there was no mapping for key.coherence::lang::UnsupportedOperationException | if the remove() operation is not supported by this map | |
ClassCastException | if the typed map is broken by external usage |
The typed version of the method Map::putAll.
Copy all of the mappings from the specified typed map to this map.
vMap | mappings to be stored in this map. |
coherence::lang::UnsupportedOperationException | if the put() operation is not supported by this map |
virtual KeySet::View keySetTyped | ( | ) | const [inline, virtual] |
The typed version of the method Map::keySet.
Return a typed set view of the keys contained in this map.
virtual KeySet::Handle keySetTyped | ( | ) | [inline, virtual] |
The typed version of the method Map::keySet.
Return a typed set view of the keys contained in this map.
virtual ValueCollection::View valuesTyped | ( | ) | const [inline, virtual] |
The typed version of the method Map::values.
Return a typed collection view of the values contained in this map.
virtual ValueCollection::Handle valuesTyped | ( | ) | [inline, virtual] |
The typed version of the method Map::values.
Return a typed collection view of the values contained in this map.
virtual EntrySet::View entrySetTyped | ( | ) | const [inline, virtual] |
The typed version of the method Map::entrySet.
Return a typed set view of the mappings contained in this map.
virtual EntrySet::Handle entrySetTyped | ( | ) | [inline, virtual] |
The typed version of the method Map::entrySet.
Return a typed set view of the mappings contained in this map.