Key - Value - public interface MultiMap<Key,Value> extends Map<Key,Collection<Value>>, Iterable<Map.Entry<Key,Value>>
MultiMap allows to map a key to several values. This class is
similar to the Apache MultiMap, but assumes that it is a proper Map between a
key and a set of values rather than a special Map between a
key and each of its single values. Thus, where the Apache one appears
as a common Map but with the need to make casting and other tricky
things to use it fully, this MultiMap implements as much as possible
the concept to provide a user-friendly class.| Modifier and Type | Method and Description |
|---|---|
boolean |
containsCouple(Key key,
Value value) |
boolean |
depopulate(Key key,
Collection<Value> values)
Remove some values from a key.
|
boolean |
depopulate(Key key,
Value... values)
Same as
depopulate(Object, Collection). |
boolean |
populate(Key key,
Collection<Value> values)
Map a key to all the provided values.
|
boolean |
populate(Key key,
Value... values)
Same as
populate(Object, Collection). |
boolean populate(Key key, Value... values)
populate(Object, Collection).boolean populate(Key key, Collection<Value> values)
true if some values have been addedboolean depopulate(Key key, Value... values)
depopulate(Object, Collection).boolean depopulate(Key key, Collection<Value> values)
key - the key to remove values fromvalues - the values to removetrue if some values have been removedCopyright © 2014–2015. All rights reserved.