Class Multimap<K,V>
java.lang.Object
ch.tocco.nice2.persist.entity.spi.template.Multimap<K,V>
- All Implemented Interfaces:
Serializable
A simple multimap implemenation that is serializable, i.e. with xstream.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V> Multimap <K, V> create()
Map
<K, LinkedHashSet<V>> getMap()
keySet()
Transforms this map into a new one applying each key of this to the given function.void
void
void
void
void
void
setMap
(Map<K, LinkedHashSet<V>> map) <K2,
V2> Multimap <K2, V2> Transforms this map to a new map using the given function.
-
Constructor Details
-
Multimap
public Multimap()
-
-
Method Details
-
create
-
getMap
-
setMap
-
put
-
putAll
-
putAll
-
remove
-
removeAll
-
get
-
keySet
-
mapValues
-
mapKeys
Transforms this map into a new one applying each key of this to the given function. -
transform
public <K2,V2> Multimap<K2,V2> transform(Function<Tuple2<K, Collection<V>>, Tuple2<K2, Iterable<V2>>> fun) Transforms this map to a new map using the given function. The function receives eachkey → collection
pair. Please note, although the collection handed into the function is not mutable.
-