15 template <
class MAPKEY,
class MAPHASH,
class MAPEQUAL,
class SETVALUE,
class SETHASH,
class SETEQUAL>
37 int32_t
put(MAPKEY key, SETVALUE val) {
39 if (entry != theMap.
end()) {
40 entry->second.add(val);
41 return entry->second.size();
45 theMap.
put(key, theSet);
53 int32_t
putAll(MAPKEY key, set_type vals) {
55 if (entry != theMap.
end()) {
56 entry->second.addAll(vals.
begin(), vals.
end());
57 return entry->second.size();
60 theMap.
put(key, theSet);
iterator find(const KEY &key)
Definition: HashMap.h:110
iterator end()
Definition: HashSet.h:65
void put(const KEY &key, const VALUE &value)
Definition: HashMap.h:85
int32_t size() const
Definition: HashSet.h:49
bool add(const TYPE &type)
Definition: HashSet.h:90
iterator end()
Definition: HashMap.h:60
map_type getMap()
Definition: MapOfSets.h:30
Utility template class to handle hash set collections that can be safely copied and shared...
Definition: HashSet.h:17
int32_t put(MAPKEY key, SETVALUE val)
Adds val to the HashSet associated with key in the HashMap. If key is not already in the map...
Definition: MapOfSets.h:37
MapOfSets(map_type m)
Definition: MapOfSets.h:21
Definition: AbstractAllTermDocs.h:12
HashMap< MAPKEY, set_type, MAPHASH, MAPEQUAL > map_type
Definition: MapOfSets.h:19
map_type::iterator iterator
Definition: HashMap.h:22
int32_t putAll(MAPKEY key, set_type vals)
Adds multiple vals to the HashSet associated with key in the HashMap. If key is not already in the ma...
Definition: MapOfSets.h:53
iterator begin()
Definition: HashSet.h:61
HashSet< SETVALUE, SETHASH, SETEQUAL > set_type
Definition: MapOfSets.h:18
Helper class for keeping Lists of Objects associated with keys.
Definition: MapOfSets.h:16
map_type theMap
Definition: MapOfSets.h:26
static this_type newInstance()
Definition: HashSet.h:32