| Modifier and Type | Method and Description |
|---|---|
static <K |
readableMap(Get
Get the specified
Get as an instance of
IterableMap.
|
static <K |
writableMap(Put
|
public static <K,V> IterableMap <K ,V> readableMap(Get <K ,V> get)
Get as an instance of
IterableMap. If
get implements
IterableMap directly, no conversion will take place. If
get implements
Map but not
IterableMap it will be decorated. Otherwise an
Unmodifiable
IterableMap will be returned.
K - the key type
V - the value type
get - to wrap, must not be null
IterableMap
NullPointerException - if the argument is null
public static <K,V> Map <K ,V> writableMap(Put <K ,V> put)
Put as an instanceof
Map. If
put implements
Map directly, no conversion will take place. Otherwise a
write-only
Map will be returned. On such a
Map it is recommended that the result of #put(K, V) be discarded as it likely will not match
V at runtime.
K - the key type
V - the element type
put - to wrap, must not be null
Map
NullPointerException - if the argument is null