activemq-cpp-3.4.0
|
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>
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 |
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.
decaf::util::Map< K, V, COMPARATOR >::Map | ( | ) | [inline] |
Default constructor - does nothing.
virtual decaf::util::Map< K, V, COMPARATOR >::~Map | ( | ) | [inline, virtual] |
virtual void decaf::util::Map< K, V, COMPARATOR >::clear | ( | ) | [pure virtual] |
Removes all keys and values from this map.
UnsupportedOperationException | if 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 * >.
virtual bool decaf::util::Map< K, V, COMPARATOR >::containsKey | ( | const K & | key | ) | const [pure virtual] |
Indicates whether or this map contains a value for the given key.
key | The key to look up. |
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 * >.
virtual bool decaf::util::Map< K, V, COMPARATOR >::containsValue | ( | const V & | value | ) | const [pure virtual] |
Indicates whether or this map contains a value for the given value, i.e.
they are equal, this is done by operator== so the types must pass equivalence testing in this manner.
value | The Value to look up. |
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 * >.
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.
source | The source object to copy from. |
Implemented in decaf::util::concurrent::ConcurrentStlMap< K, V, COMPARATOR >, and decaf::util::StlMap< K, V, COMPARATOR >.
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.
source | - Map to compare to this one. |
Implemented in decaf::util::concurrent::ConcurrentStlMap< K, V, COMPARATOR >, and decaf::util::StlMap< K, V, COMPARATOR >.
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.
key | The search key. |
NoSuchElementException | if 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().
virtual const V& decaf::util::Map< K, V, COMPARATOR >::get | ( | const K & | key | ) | const [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.
key | The search key. |
NoSuchElementException | if 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 * >.
virtual bool decaf::util::Map< K, V, COMPARATOR >::isEmpty | ( | ) | const [pure virtual] |
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 * >.
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.
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().
virtual void decaf::util::Map< K, V, COMPARATOR >::put | ( | const K & | key, |
const V & | value | ||
) | [pure virtual] |
Sets the value for the specified key.
key | The target key. |
value | The value to be set. |
UnsupportedOperationException | if this map is unmodifiable. |
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 * >.
virtual void decaf::util::Map< K, V, COMPARATOR >::putAll | ( | const Map< K, V, COMPARATOR > & | other | ) | [pure virtual] |
Stores a copy of the Mappings contained in the other Map in this one.
UnsupportedOperationException | If the implementing class does not support the putAll operation. |
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 * >.
virtual V decaf::util::Map< K, V, COMPARATOR >::remove | ( | const K & | key | ) | [pure virtual] |
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.
key | The search key. |
NoSuchElementException | if this key is not in the Map. |
UnsupportedOperationException | if this map is unmodifiable. |
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 * >.
virtual int decaf::util::Map< K, V, COMPARATOR >::size | ( | ) | const [pure virtual] |
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 * >.
virtual std::vector<V> decaf::util::Map< K, V, COMPARATOR >::values | ( | ) | const [pure virtual] |
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 * >.