Class Multimap<K,V>
- java.lang.Object
-
- org.greenrobot.essentials.collections.AbstractMultimap<K,V,java.util.List<V>>
-
- org.greenrobot.essentials.collections.Multimap<K,V>
-
- All Implemented Interfaces:
java.util.Map<K,java.util.List<V>>
public class Multimap<K,V> extends AbstractMultimap<K,V,java.util.List<V>>
Combines a Map with List values to provide simple way to store multiple values for a key.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Multimap.ListType
-
Field Summary
Fields Modifier and Type Field Description private Multimap.ListType
listType
-
Fields inherited from class org.greenrobot.essentials.collections.AbstractMultimap
map
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Multimap(java.util.Map<K,java.util.List<V>> map, Multimap.ListType listType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <K,V>
Multimap<K,V>create()
static <K,V>
Multimap<K,V>create(Multimap.ListType listType)
protected java.util.List<V>
createNewCollection()
-
Methods inherited from class org.greenrobot.essentials.collections.AbstractMultimap
clear, containsElement, containsElement, containsKey, containsValue, countElements, countElements, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, putElement, putElements, remove, removeElement, size, values, valuesElements
-
-
-
-
Field Detail
-
listType
private final Multimap.ListType listType
-
-
Constructor Detail
-
Multimap
protected Multimap(java.util.Map<K,java.util.List<V>> map, Multimap.ListType listType)
-
-
Method Detail
-
create
public static <K,V> Multimap<K,V> create()
-
create
public static <K,V> Multimap<K,V> create(Multimap.ListType listType)
-
createNewCollection
protected java.util.List<V> createNewCollection()
- Specified by:
createNewCollection
in classAbstractMultimap<K,V,java.util.List<V>>
-
-