18 #ifndef _DECAF_UTIL_MAP_H_ 19 #define _DECAF_UTIL_MAP_H_ 87 template <
typename K,
typename V>
94 Map() : concurrent::Synchronizable() {}
109 virtual bool equals(
const Map& source)
const = 0;
119 virtual void copy(
const Map& source) = 0;
127 virtual void clear() = 0;
157 virtual bool isEmpty()
const = 0;
162 virtual int size()
const = 0;
176 virtual V&
get(
const K& key) = 0;
190 virtual const V&
get(
const K& key)
const = 0;
210 virtual bool put(
const K& key,
const V& value) = 0;
237 virtual bool put(
const K& key,
const V& value, V& oldValue) = 0;
267 virtual V
remove(
const K& key) = 0;
A collection that contains no duplicate elements.
Definition: Set.h:45
virtual bool containsValue(const V &value) const =0
Returns true if this map maps one or more keys to the specified value.
Map()
Default constructor - does nothing.
Definition: Map.h:94
virtual void clear()=0
Removes all of the mappings from this map (optional operation).
virtual bool containsKey(const K &key) const =0
Returns true if this map contains a mapping for the specified key.
virtual Collection< V > & values()=0
Returns a Collection view of the values contained in this 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 ~Map()
Definition: Map.h:96
virtual int size() const =0
virtual bool put(const K &key, const V &value)=0
Associates the specified value with the specified key in this map (optional operation).
An object that maps keys to values.
Definition: Map.h:88
virtual void putAll(const Map< K, V > &other)=0
Copies all of the mappings from the specified map to this map (optional operation).
virtual bool isEmpty() const =0
virtual Set< K > & keySet()=0
Returns a Set view of the keys contained in this map.
The interface for all synchronizable objects (that is, objects that can be locked and unlocked)...
Definition: Synchronizable.h:37
virtual Set< MapEntry< K, V > > & entrySet()=0
Returns a Set view of the mappings contained in this map.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25