Class SplitMapUtils
java.lang.Object
org.apache.commons.collections4.SplitMapUtils
- Since:
- 4.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K,V> IterableMap <K, V> readableMap(Get<K, V> get) Gets the specifiedGetas an instance ofIterableMap.static <K,V> Map <K, V> writableMap(Put<K, V> put)
-
Method Details
-
readableMap
Gets the specifiedGetas an instance ofIterableMap. IfgetimplementsIterableMapdirectly, no conversion will take place. IfgetimplementsMapbut notIterableMapit will be decorated. Otherwise, anUnmodifiableIterableMapwill be returned.- Type Parameters:
K- the key typeV- the value type- Parameters:
get- to wrap, must not be null- Returns:
IterableMap- Throws:
NullPointerException- if the argument is null
-
writableMap
Gets the specifiedPutas an instanceofMap. IfputimplementsMapdirectly, no conversion will take place. Otherwise, a write-onlyMapwill be returned. On such aMapit is recommended that the result of #put(K, V) be discarded as it likely will not matchVat runtime.- Type Parameters:
K- the key typeV- the element type- Parameters:
put- to wrap, must not be null- Returns:
Map- Throws:
NullPointerException- if the argument is null
-