Public Member Functions |
| PrimitiveMap () |
| Default Constructor, creates an empty map.
|
virtual | ~PrimitiveMap () |
| PrimitiveMap (const decaf::util::Map< std::string, PrimitiveValueNode > &source) |
| Copy Constructor.
|
| PrimitiveMap (const PrimitiveMap &source) |
| Copy Constructor.
|
std::string | toString () const |
| Converts the contents into a formatted string that can be output in a Log File or other debugging tool.
|
virtual
PrimitiveValueNode::PrimitiveType | getValueType (const std::string &key) const |
virtual bool | getBool (const std::string &key) const |
| Gets the Boolean value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.
|
virtual void | setBool (const std::string &key, bool value) |
| Sets the value at key to the specified type.
|
virtual unsigned char | getByte (const std::string &key) const |
| Gets the Byte value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.
|
virtual void | setByte (const std::string &key, unsigned char value) |
| Sets the value at key to the specified type.
|
virtual char | getChar (const std::string &key) const |
| Gets the Character value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.
|
virtual void | setChar (const std::string &key, char value) |
| Sets the value at key to the specified type.
|
virtual short | getShort (const std::string &key) const |
| Gets the Short value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.
|
virtual void | setShort (const std::string &key, short value) |
| Sets the value at key to the specified type.
|
virtual int | getInt (const std::string &key) const |
| Gets the Integer value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.
|
virtual void | setInt (const std::string &key, int value) |
| Sets the value at key to the specified type.
|
virtual long long | getLong (const std::string &key) const |
| Gets the Long value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.
|
virtual void | setLong (const std::string &key, long long value) |
| Sets the value at key to the specified type.
|
virtual float | getFloat (const std::string &key) const |
| Gets the Float value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.
|
virtual void | setFloat (const std::string &key, float value) |
| Sets the value at key to the specified type.
|
virtual double | getDouble (const std::string &key) const |
| Gets the Double value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.
|
virtual void | setDouble (const std::string &key, double value) |
| Sets the value at key to the specified type.
|
virtual std::string | getString (const std::string &key) const |
| Gets the String value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.
|
virtual void | setString (const std::string &key, const std::string &value) |
| Sets the value at key to the specified type.
|
virtual std::vector< unsigned
char > | getByteArray (const std::string &key) const |
| Gets the Byte Array value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.
|
virtual void | setByteArray (const std::string &key, const std::vector< unsigned char > &value) |
| Sets the value at key to the specified type.
|
| StlMap () |
| Default constructor - does nothing.
|
| StlMap (const StlMap &source) |
| Copy constructor - copies the content of the given map into this one.
|
| StlMap (const Map< std::string, PrimitiveValueNode > &source) |
| Copy constructor - copies the content of the given map into this one.
|
virtual | ~StlMap () |
virtual bool | equals (const StlMap &source) const |
|
|
virtual bool | equals (const Map< std::string, PrimitiveValueNode > &source) const |
|
|
virtual void | copy (const StlMap &source) |
|
|
virtual void | copy (const Map< std::string, PrimitiveValueNode > &source) |
|
|
virtual void | clear () |
| Removes all of the mappings from this map (optional operation).The map will be empty after this call returns.- Exceptions
-
UnsupportedOperationException | if the clear operation is not supported by this map. |
|
virtual bool | containsKey (const std::string &key) const |
| Returns true if this map contains a mapping for the specified key.More formally, returns true if and only if this map contains a mapping for a key k such that (key == k). (There can be at most one such mapping.)- Parameters
-
- Returns
- true if this map contains the key mapping, otherwise false.
|
virtual bool | containsValue (const PrimitiveValueNode &value) const |
| Returns true if this map maps one or more keys to the specified value.More formally, returns true if and only if this map contains at least one mapping to a value v such that (value==v). This operation will probably require time linear in the map size for most implementations of the Map interface.- Parameters
-
value | The Value to look up in this Map. |
- Returns
- true if this map contains at least one mapping for the value, otherwise false.
|
virtual bool | isEmpty () const |
| - Returns
- if the Map contains any element or not, TRUE or FALSE
|
virtual int | size () const |
| - Returns
- The number of elements (key/value pairs) in this map.
|
virtual PrimitiveValueNode & | get (const std::string &key) |
| 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
-
key | The search key whose value should be returned if present. |
- Returns
- A reference to the value for the given key if present in the Map.
- Exceptions
-
NoSuchElementException | if the key requests doesn't exist in the Map. |
|
virtual const PrimitiveValueNode & | get (const std::string &key) const |
| 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
-
key | The search key whose value should be returned if present. |
- Returns
- A const reference to the value for the given key if present in the Map.
- Exceptions
-
NoSuchElementException | if the key requests doesn't exist in the Map. |
|
virtual bool | put (const std::string &key, const PrimitiveValueNode &value) |
| Associates the specified value with the specified key in this map (optional operation).If the map previously contained a mapping for the key, the old value is replaced by the specified value. (A map m is said to contain a mapping for a key k if and only if m.containsKey(k) would return true.)- Parameters
-
key | The target key. |
value | The value to be set. |
- Returns
- true if the put operation replaced a value that was associated with an existing mapping to the given key or false otherwise.
- Exceptions
-
UnsupportedOperationException | if this map is unmodifiable. |
IllegalArgumentException | if some property of the specified key or value prevents it from being stored in this map |
|
virtual bool | put (const std::string &key, const PrimitiveValueNode &value, PrimitiveValueNode &oldValue) |
| Associates the specified value with the specified key in this map (optional operation).If the map previously contained a mapping for the key, the old value is replaced by the specified value. (A map m is said to contain a mapping for a key k if and only if m.containsKey(k) would return true.)This method accepts a reference to a value which will be assigned the previous value for the given key (if any). If there was no previous mapping for the given key the out value is not written to. A return of true indicates that a value was replaced by this put operation.- Parameters
-
key | The target key. |
value | The value to be set. |
oldValue | (out) The value previously held in the mapping for this key. . |
- Returns
- true if the put operation replaced a value that was associated with an existing mapping to the given key or false otherwise.
- Exceptions
-
UnsupportedOperationException | if this map is unmodifiable. |
IllegalArgumentException | if some property of the specified key or value prevents it from being stored in this map |
|
virtual void | putAll (const StlMap< std::string, PrimitiveValueNode, std::less< std::string > > &other) |
|
|
virtual void | putAll (const Map< std::string, PrimitiveValueNode > &other) |
| Copies all of the mappings from the specified map to this map (optional operation).The effect of this call is equivalent to that of calling put(k, v) on this map once for each mapping from key k to value v in the specified map. The behavior of this operation is undefined if the specified map is modified while the operation is in progress.- Parameters
-
other | A Map instance whose elements are to all be inserted in this Map. |
- Exceptions
-
UnsupportedOperationException | If the implementing class does not support the putAll operation. |
|
virtual PrimitiveValueNode | remove (const std::string &key) |
| 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.Care must be taken when using this operation as it will throw an exception if there is no mapping for the given key.- Parameters
-
key | The search key whose mapping is to be removed. |
- Returns
- a copy of the element that was previously mapped to the given key.
- Exceptions
-
NoSuchElementException | if this key is not in the Map. |
UnsupportedOperationException | if this map is unmodifiable. |
|
virtual Set< MapEntry
< std::string,
PrimitiveValueNode > > & | entrySet () |
| Returns a Set view of the mappings contained in this map.
|
virtual const Set< MapEntry
< std::string,
PrimitiveValueNode > > & | entrySet () const |
virtual Set< std::string > & | keySet () |
| Returns a Set view of the keys contained in this map.
|
virtual const Set< std::string > & | keySet () const |
virtual Collection
< PrimitiveValueNode > & | values () |
| Returns a Collection view of the values contained in this map.
|
virtual const Collection
< PrimitiveValueNode > & | values () const |
virtual void | lock () |
| Locks the object.
|
virtual bool | tryLock () |
| Attempts to Lock the object, if the lock is already held by another thread than this method returns false.
|
virtual void | unlock () |
| Unlocks the object.
|
virtual void | wait () |
| Waits on a signal from this object, which is generated by a call to Notify.
|
virtual void | wait (long long millisecs) |
| Waits on a signal from this object, which is generated by a call to Notify.
|
virtual void | wait (long long millisecs, int nanos) |
| Waits on a signal from this object, which is generated by a call to Notify.
|
virtual void | notify () |
| Signals a waiter on this object that it can now wake up and continue.
|
virtual void | notifyAll () |
| Signals the waiters on this object that it can now wake up and continue.
|
| Map () |
| Default constructor - does nothing.
|
virtual | ~Map () |
virtual bool | equals (const Map &source) const =0 |
| Compares the specified object with this map for equality.
|
virtual void | copy (const Map &source)=0 |
| Copies the content of the source map into this map.
|
virtual | ~Synchronizable () |