|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.collections4.SplitMapUtils
public class SplitMapUtils
Utilities for working with "split maps:" objects that implement Put
and/or Get
but not Map
.
Get
,
Put
Method Summary | ||
---|---|---|
static
|
readableMap(Get<K,V> get)
Get the specified Get as an instance of IterableMap . |
|
static
|
writableMap(Put<K,V> put)
Get the specified Put as an instanceof Map . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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 typeV
- the value typeget
- to wrap, must not be null
IterableMap
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 typeV
- the element typeput
- to wrap, must not be null
Map
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |