public final class MultiKeyMaps
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static <T,K extends java.lang.Iterable<T>,V> |
newMultiKeyMap()
Creates a new default, Serialiazable instance of MultiKeyMap.
|
static <T,K extends java.lang.Iterable<T>,V> |
newMultiKeyMap(java.util.function.Supplier<java.util.Map<K,V>> mapSupplier,
boolean concurrent)
Creates a new MultiKeyMap based on the provided map supplier.
|
static <T,K extends java.lang.Iterable<T>,V> |
of(java.util.Map<K,V> map)
Creates a new default, Serialiazable instance of MultiKeyMap initialized off the data by the supplied Map.
|
public static <T,K extends java.lang.Iterable<T>,V> MultiKeyMap<T,K,V> newMultiKeyMap(java.util.function.Supplier<java.util.Map<K,V>> mapSupplier, boolean concurrent)
NOTE: Use with caution. This is the advanced functionality.
T
- the type of a sub-key the key consist ofK
- the type of a full key, which is an Iterable of its sub-keys, with usage as in a
regular MapV
- the type of a value which stored in the MultiKeyMap under the corresponding keymapSupplier
- a supplier of Map<K, V>
this MultiKeyMap is based onconcurrent
- create a concurrent instance if true, un-synchronized, regular instance, otherwisepublic static <T,K extends java.lang.Iterable<T>,V> MultiKeyMap<T,K,V> newMultiKeyMap()
T
- the type of a sub-key the key consist ofK
- the type of a full key, which is an Iterable of its sub-keys, with usage as in a
regular MapV
- the type of a value which stored in the MultiKeyMap under the corresponding keypublic static <T,K extends java.lang.Iterable<T>,V> MultiKeyMap<T,K,V> of(java.util.Map<K,V> map)
T
- the type of a sub-key the key consist ofK
- the type of a full key, which is an Iterable of its sub-keys, with usage as in a
regular MapV
- the type of a value which stored in the MultiKeyMap under the corresponding keymap
- a Map instance to copy data from; the data copied shallowly.