KeyType
- the type of the keys stored in the multimapValueType
- the type of the values stored in the multimappublic abstract class QueryResultMultimap<KeyType,ValueType> extends QueryResultAssociativeStore<KeyType,ValueType> implements com.google.common.collect.Multimap<KeyType,ValueType>
Multimap
interface to represent query results. A query result multimap takes a model query,
with a specified key (input/source) parameter and a value (output/target) parameter.
Apart from the standard multimap behavior, it is possible to register listeners that are notified when the contents of the multimap change.
Subclasses of the query result multimap can attach to any query evaluation engine and shoug
Modifier and Type | Method and Description |
---|---|
java.util.Map<KeyType,java.util.Collection<ValueType>> |
asMap() |
void |
clear() |
boolean |
containsEntry(java.lang.Object key,
java.lang.Object value) |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
java.util.Collection<java.util.Map.Entry<KeyType,ValueType>> |
entries() |
java.util.Collection<ValueType> |
get(KeyType key) |
boolean |
isEmpty() |
com.google.common.collect.Multiset<KeyType> |
keys() |
java.util.Set<KeyType> |
keySet() |
boolean |
put(KeyType key,
ValueType value) |
boolean |
putAll(KeyType key,
java.lang.Iterable<? extends ValueType> values) |
boolean |
putAll(com.google.common.collect.Multimap<? extends KeyType,? extends ValueType> multimap) |
boolean |
remove(java.lang.Object key,
java.lang.Object value) |
java.util.Collection<ValueType> |
removeAll(java.lang.Object key) |
java.util.Collection<ValueType> |
replaceValues(KeyType key,
java.lang.Iterable<? extends ValueType> values) |
int |
size() |
java.util.Collection<ValueType> |
values() |
addCallbackOnQueryResultUpdate, removeCallbackOnQueryResultUpdate, setQueryResultSetter
public int size()
public boolean isEmpty()
public boolean containsKey(java.lang.Object key)
public boolean containsValue(java.lang.Object value)
public boolean containsEntry(java.lang.Object key, java.lang.Object value)
public java.util.Set<KeyType> keySet()
The returned set is immutable.
public com.google.common.collect.Multiset<KeyType> keys()
The returned multiset is immutable.
public java.util.Collection<ValueType> values()
The returned collection is immutable.
public java.util.Collection<java.util.Map.Entry<KeyType,ValueType>> entries()
The returned collection is immutable.
public java.util.Map<KeyType,java.util.Collection<ValueType>> asMap()
The returned map is immutable.
public boolean put(KeyType key, ValueType value)
Throws UnsupportedOperationException
if there is no IQueryResultSetter
public boolean remove(java.lang.Object key, java.lang.Object value)
Throws UnsupportedOperationException
if there is no IQueryResultSetter
public boolean putAll(KeyType key, java.lang.Iterable<? extends ValueType> values)
Throws UnsupportedOperationException
if there is no IQueryResultSetter
public boolean putAll(com.google.common.collect.Multimap<? extends KeyType,? extends ValueType> multimap)
Throws UnsupportedOperationException
if there is no IQueryResultSetter
public java.util.Collection<ValueType> replaceValues(KeyType key, java.lang.Iterable<? extends ValueType> values)
Throws UnsupportedOperationException
if there is no IQueryResultSetter
The returned collection is immutable.
public java.util.Collection<ValueType> removeAll(java.lang.Object key)
Throws UnsupportedOperationException
if there is no IQueryResultSetter
The returned collection is immutable.
public void clear()
Throws UnsupportedOperationException
if there is no IQueryResultSetter