Package org.apache.commons.collections4

# Class SplitMapUtils

java.lang.Object
org.apache.commons.collections4.SplitMapUtils

public class SplitMapUtils extends Object
Utilities for working with "split maps:" objects that implement `Put` and/or `Get` but not `Map`.

Since:
  4.0
See Also:
  - `Get`
  - `Put`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <K, V> IterableMap<K,V>`
  `readableMap(Get<K,V> get)`
  Gets the specified `Get` as an instance of `IterableMap`.
  `static <K, V> Map<K,V>`
  `writableMap(Put<K,V> put)`
  Gets 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 Details

  - ### readableMap

    public static <K, V> IterableMap<K,V> readableMap(Get<K,V> get)
    Gets the specified `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.
    Type Parameters:
      `K` - The key type
      `V` - The value type
    Parameters:
      `get` - to wrap, must not be null
    Returns:
      `IterableMap`
    Throws:
      `NullPointerException` - if the argument is null

  - ### writableMap

    public static <K, V> Map<K,V> writableMap(Put<K,V> put)
    Gets the specified `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.
    Type Parameters:
      `K` - The key type
      `V` - The element type
    Parameters:
      `put` - to wrap, must not be null
    Returns:
      `Map`
    Throws:
      `NullPointerException` - if the argument is null