activemq-cpp-3.4.0

decaf::util::Map< K, V, COMPARATOR > Class Template Reference

Map template that wraps around a std::map to provide a more user-friendly interface and to provide common functions that do not exist in std::map. More...

#include <src/main/decaf/util/Map.h>

Inheritance diagram for decaf::util::Map< K, V, COMPARATOR >:

Data Structures

class  Entry

Public Member Functions

 Map ()
 Default constructor - does nothing.
virtual ~Map ()
virtual bool equals (const Map &source) const =0
 Comparison, equality is dependent on the method of determining if the element are equal.
virtual void copy (const Map &source)=0
 Copies the content of the source map into this map.
virtual void clear ()=0
 Removes all keys and values from this map.
virtual bool containsKey (const K &key) const =0
 Indicates whether or this map contains a value for the given key.
virtual bool containsValue (const V &value) const =0
 Indicates whether or this map contains a value for the given value, i.e.
virtual bool isEmpty () const =0
virtual int size () const =0
virtual V & get (const K &key)=0
 Gets the value mapped to the specified key in the Map.
virtual const V & get (const K &key) const =0
 Gets the value mapped to the specified key in the Map.
virtual void put (const K &key, const V &value)=0
 Sets the value for the specified key.
virtual void putAll (const Map< K, V, COMPARATOR > &other)=0
 Stores a copy of the Mappings contained in the other Map in this one.
virtual V remove (const K &key)=0
 Removes the value (key/value pair) for the specified key from the map, returns a copy of the value that was mapped to the key.
virtual std::vector< K > keySet () const =0
 Returns a Set view of the mappings contained in this map.
virtual std::vector< V > values () const =0

Detailed Description

template<typename K, typename V, typename COMPARATOR = std::less<K>>
class decaf::util::Map< K, V, COMPARATOR >

Map template that wraps around a std::map to provide a more user-friendly interface and to provide common functions that do not exist in std::map.


Constructor & Destructor Documentation

template<typename K, typename V, typename COMPARATOR = std::less<K>>
decaf::util::Map< K, V, COMPARATOR >::Map ( ) [inline]

Default constructor - does nothing.

template<typename K, typename V, typename COMPARATOR = std::less<K>>
virtual decaf::util::Map< K, V, COMPARATOR >::~Map ( ) [inline, virtual]

Member Function Documentation

template<typename K, typename V, typename COMPARATOR = std::less<K>>
virtual void decaf::util::Map< K, V, COMPARATOR >::clear ( ) [pure virtual]

Removes all keys and values from this map.

Exceptions:
UnsupportedOperationExceptionif this map is unmodifiable.

Implemented in decaf::util::concurrent::ConcurrentStlMap< K, V, COMPARATOR >, decaf::util::StlMap< K, V, COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< MessageId >, Pointer< Message >, MessageId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< ConnectionId >, Pointer< ConnectionState >, ConnectionId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< ConsumerId >, Pointer< ConsumerState >, ConsumerId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< SessionId >, Pointer< SessionState >, SessionId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< LocalTransactionId >, Pointer< TransactionState >, LocalTransactionId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< ProducerId >, Pointer< ProducerState >, ProducerId::COMPARATOR >, decaf::util::StlMap< cms::Session *, SessionResolver * >, decaf::util::StlMap< std::string, WireFormatFactory * >, decaf::util::StlMap< decaf::lang::Runnable *, decaf::util::TimerTask * >, decaf::util::StlMap< std::string, PrimitiveValueNode >, decaf::util::StlMap< std::string, cms::Queue * >, decaf::util::StlMap< std::string, CachedConsumer * >, decaf::util::StlMap< Pointer< commands::ConsumerId >, ActiveMQConsumer *, commands::ConsumerId::COMPARATOR >, decaf::util::StlMap< std::string, TransportFactory * >, decaf::util::StlMap< Pointer< ConsumerId >, Pointer< ConsumerInfo >, ConsumerId::COMPARATOR >, decaf::util::StlMap< int, Pointer< Command > >, decaf::util::StlMap< std::string, CachedProducer * >, and decaf::util::StlMap< std::string, cms::Topic * >.

template<typename K, typename V, typename COMPARATOR = std::less<K>>
virtual void decaf::util::Map< K, V, COMPARATOR >::copy ( const Map< K, V, COMPARATOR > &  source) [pure virtual]

Copies the content of the source map into this map.

Erases all existing data in this map.

Parameters:
sourceThe source object to copy from.

Implemented in decaf::util::concurrent::ConcurrentStlMap< K, V, COMPARATOR >, and decaf::util::StlMap< K, V, COMPARATOR >.

template<typename K, typename V, typename COMPARATOR = std::less<K>>
virtual bool decaf::util::Map< K, V, COMPARATOR >::equals ( const Map< K, V, COMPARATOR > &  source) const [pure virtual]

Comparison, equality is dependent on the method of determining if the element are equal.

Parameters:
source- Map to compare to this one.
Returns:
true if the Map passed is equal in value to this one.

Implemented in decaf::util::concurrent::ConcurrentStlMap< K, V, COMPARATOR >, and decaf::util::StlMap< K, V, COMPARATOR >.

template<typename K, typename V, typename COMPARATOR = std::less<K>>
virtual V& decaf::util::Map< K, V, COMPARATOR >::get ( const K &  key) [pure virtual]

Gets the value mapped to the specified key in the Map.

If there is no element in the map whose key is equivalent to the key provided then a NoSuchElementException is thrown.

Parameters:
keyThe search key.
Returns:
A reference to the value for the given key.
Exceptions:
NoSuchElementExceptionif the key requests doesn't exist in the Map.

Implemented in decaf::util::concurrent::ConcurrentStlMap< K, V, COMPARATOR >, decaf::util::StlMap< K, V, COMPARATOR >, decaf::util::StlMap< cms::Session *, SessionResolver * >, decaf::util::StlMap< std::string, WireFormatFactory * >, decaf::util::StlMap< decaf::lang::Runnable *, decaf::util::TimerTask * >, decaf::util::StlMap< std::string, PrimitiveValueNode >, decaf::util::StlMap< std::string, cms::Queue * >, decaf::util::StlMap< std::string, CachedConsumer * >, decaf::util::StlMap< Pointer< commands::ConsumerId >, ActiveMQConsumer *, commands::ConsumerId::COMPARATOR >, decaf::util::StlMap< std::string, TransportFactory * >, decaf::util::StlMap< Pointer< ConsumerId >, Pointer< ConsumerInfo >, ConsumerId::COMPARATOR >, decaf::util::StlMap< int, Pointer< Command > >, decaf::util::StlMap< std::string, CachedProducer * >, and decaf::util::StlMap< std::string, cms::Topic * >.

Referenced by decaf::util::StlMap< std::string, cms::Topic * >::equals(), decaf::util::concurrent::ConcurrentStlMap< Pointer< ProducerId >, Pointer< ProducerState >, ProducerId::COMPARATOR >::equals(), decaf::util::StlMap< std::string, cms::Topic * >::putAll(), and decaf::util::concurrent::ConcurrentStlMap< Pointer< ProducerId >, Pointer< ProducerState >, ProducerId::COMPARATOR >::putAll().

template<typename K, typename V, typename COMPARATOR = std::less<K>>
virtual bool decaf::util::Map< K, V, COMPARATOR >::isEmpty ( ) const [pure virtual]
Returns:
if the Map contains any element or not, TRUE or FALSE

Implemented in decaf::util::concurrent::ConcurrentStlMap< K, V, COMPARATOR >, decaf::util::StlMap< K, V, COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< MessageId >, Pointer< Message >, MessageId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< ConnectionId >, Pointer< ConnectionState >, ConnectionId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< ConsumerId >, Pointer< ConsumerState >, ConsumerId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< SessionId >, Pointer< SessionState >, SessionId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< LocalTransactionId >, Pointer< TransactionState >, LocalTransactionId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< ProducerId >, Pointer< ProducerState >, ProducerId::COMPARATOR >, decaf::util::StlMap< cms::Session *, SessionResolver * >, decaf::util::StlMap< std::string, WireFormatFactory * >, decaf::util::StlMap< decaf::lang::Runnable *, decaf::util::TimerTask * >, decaf::util::StlMap< std::string, PrimitiveValueNode >, decaf::util::StlMap< std::string, cms::Queue * >, decaf::util::StlMap< std::string, CachedConsumer * >, decaf::util::StlMap< Pointer< commands::ConsumerId >, ActiveMQConsumer *, commands::ConsumerId::COMPARATOR >, decaf::util::StlMap< std::string, TransportFactory * >, decaf::util::StlMap< Pointer< ConsumerId >, Pointer< ConsumerInfo >, ConsumerId::COMPARATOR >, decaf::util::StlMap< int, Pointer< Command > >, decaf::util::StlMap< std::string, CachedProducer * >, and decaf::util::StlMap< std::string, cms::Topic * >.

template<typename K, typename V, typename COMPARATOR = std::less<K>>
virtual std::vector<K> decaf::util::Map< K, V, COMPARATOR >::keySet ( ) const [pure virtual]

Returns a Set view of the mappings contained in this map.

The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. If the map is modified while an iteration over the set is in progress (except through the iterator's own remove operation, or through the setValue operation on a map entry returned by the iterator) the results of the iteration are undefined. The set supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Set.remove, removeAll, retainAll and clear operations. It does not support the add or addAll operations.

Returns:
the entire set of keys in this map as a std::vector.

Implemented in decaf::util::concurrent::ConcurrentStlMap< K, V, COMPARATOR >, decaf::util::StlMap< K, V, COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< MessageId >, Pointer< Message >, MessageId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< ConnectionId >, Pointer< ConnectionState >, ConnectionId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< ConsumerId >, Pointer< ConsumerState >, ConsumerId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< SessionId >, Pointer< SessionState >, SessionId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< LocalTransactionId >, Pointer< TransactionState >, LocalTransactionId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< ProducerId >, Pointer< ProducerState >, ProducerId::COMPARATOR >, decaf::util::StlMap< cms::Session *, SessionResolver * >, decaf::util::StlMap< std::string, WireFormatFactory * >, decaf::util::StlMap< decaf::lang::Runnable *, decaf::util::TimerTask * >, decaf::util::StlMap< std::string, PrimitiveValueNode >, decaf::util::StlMap< std::string, cms::Queue * >, decaf::util::StlMap< std::string, CachedConsumer * >, decaf::util::StlMap< Pointer< commands::ConsumerId >, ActiveMQConsumer *, commands::ConsumerId::COMPARATOR >, decaf::util::StlMap< std::string, TransportFactory * >, decaf::util::StlMap< Pointer< ConsumerId >, Pointer< ConsumerInfo >, ConsumerId::COMPARATOR >, decaf::util::StlMap< int, Pointer< Command > >, decaf::util::StlMap< std::string, CachedProducer * >, and decaf::util::StlMap< std::string, cms::Topic * >.

Referenced by decaf::util::StlMap< std::string, cms::Topic * >::equals(), decaf::util::concurrent::ConcurrentStlMap< Pointer< ProducerId >, Pointer< ProducerState >, ProducerId::COMPARATOR >::equals(), decaf::util::StlMap< std::string, cms::Topic * >::putAll(), and decaf::util::concurrent::ConcurrentStlMap< Pointer< ProducerId >, Pointer< ProducerState >, ProducerId::COMPARATOR >::putAll().

template<typename K, typename V, typename COMPARATOR = std::less<K>>
virtual int decaf::util::Map< K, V, COMPARATOR >::size ( ) const [pure virtual]
Returns:
The number of elements (key/value pairs) in this map.

Implemented in decaf::util::concurrent::ConcurrentStlMap< K, V, COMPARATOR >, decaf::util::StlMap< K, V, COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< MessageId >, Pointer< Message >, MessageId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< ConnectionId >, Pointer< ConnectionState >, ConnectionId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< ConsumerId >, Pointer< ConsumerState >, ConsumerId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< SessionId >, Pointer< SessionState >, SessionId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< LocalTransactionId >, Pointer< TransactionState >, LocalTransactionId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< ProducerId >, Pointer< ProducerState >, ProducerId::COMPARATOR >, decaf::util::StlMap< cms::Session *, SessionResolver * >, decaf::util::StlMap< std::string, WireFormatFactory * >, decaf::util::StlMap< decaf::lang::Runnable *, decaf::util::TimerTask * >, decaf::util::StlMap< std::string, PrimitiveValueNode >, decaf::util::StlMap< std::string, cms::Queue * >, decaf::util::StlMap< std::string, CachedConsumer * >, decaf::util::StlMap< Pointer< commands::ConsumerId >, ActiveMQConsumer *, commands::ConsumerId::COMPARATOR >, decaf::util::StlMap< std::string, TransportFactory * >, decaf::util::StlMap< Pointer< ConsumerId >, Pointer< ConsumerInfo >, ConsumerId::COMPARATOR >, decaf::util::StlMap< int, Pointer< Command > >, decaf::util::StlMap< std::string, CachedProducer * >, and decaf::util::StlMap< std::string, cms::Topic * >.

template<typename K, typename V, typename COMPARATOR = std::less<K>>
virtual std::vector<V> decaf::util::Map< K, V, COMPARATOR >::values ( ) const [pure virtual]
Returns:
the entire set of values in this map as a std::vector.

Implemented in decaf::util::concurrent::ConcurrentStlMap< K, V, COMPARATOR >, decaf::util::StlMap< K, V, COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< MessageId >, Pointer< Message >, MessageId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< ConnectionId >, Pointer< ConnectionState >, ConnectionId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< ConsumerId >, Pointer< ConsumerState >, ConsumerId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< SessionId >, Pointer< SessionState >, SessionId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< LocalTransactionId >, Pointer< TransactionState >, LocalTransactionId::COMPARATOR >, decaf::util::concurrent::ConcurrentStlMap< Pointer< ProducerId >, Pointer< ProducerState >, ProducerId::COMPARATOR >, decaf::util::StlMap< cms::Session *, SessionResolver * >, decaf::util::StlMap< std::string, WireFormatFactory * >, decaf::util::StlMap< decaf::lang::Runnable *, decaf::util::TimerTask * >, decaf::util::StlMap< std::string, PrimitiveValueNode >, decaf::util::StlMap< std::string, cms::Queue * >, decaf::util::StlMap< std::string, CachedConsumer * >, decaf::util::StlMap< Pointer< commands::ConsumerId >, ActiveMQConsumer *, commands::ConsumerId::COMPARATOR >, decaf::util::StlMap< std::string, TransportFactory * >, decaf::util::StlMap< Pointer< ConsumerId >, Pointer< ConsumerInfo >, ConsumerId::COMPARATOR >, decaf::util::StlMap< int, Pointer< Command > >, decaf::util::StlMap< std::string, CachedProducer * >, and decaf::util::StlMap< std::string, cms::Topic * >.


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