Package org.apache.sling.testing.mock.osgi

# Class MapUtil

java.lang.Object
org.apache.sling.testing.mock.osgi.MapUtil

public final class MapUtil extends Object
Map util methods.

## Method Summary

Modifier and Type
Method
Description
`static @Nullable Dictionary<String,Object>`
`toDictionary(@NotNull Object @NotNull ... args)`
Convert key/value pairs to dictionary
`static <T, U> @Nullable Dictionary<T,U>`
`toDictionary(@Nullable Map<T,U> map)`
Convert map to dictionary.
`static @NotNull Map<String,Object>`
`toMap(@NotNull Object @NotNull ... args)`
Convert key/value pairs to map
`static <T, U> @Nullable Map<T,U>`
`toMap(@Nullable Dictionary<T,U> dictionary)`
Convert Dictionary to map

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### toDictionary

@Nullable public static <T, U> @Nullable Dictionary<T,U> toDictionary(@Nullable @Nullable Map<T,U> map)
Convert map to dictionary.

Type Parameters:
  `T` - Key
  `U` - Value
Parameters:
  `map` - Map
Returns:
  Dictionary

### toMap

@Nullable public static <T, U> @Nullable Map<T,U> toMap(@Nullable @Nullable Dictionary<T,U> dictionary)
Convert Dictionary to map

Type Parameters:
  `T` - Key
  `U` - Value
Parameters:
  `dictionary` - Dictionary
Returns:
  Map

### toDictionary

@Nullable public static @Nullable Dictionary<String,Object> toDictionary(@NotNull @NotNull Object @NotNull ... args)
Convert key/value pairs to dictionary

Parameters:
  `args` - Key/value pairs
Returns:
  Dictionary

### toMap

@NotNull public static @NotNull Map<String,Object> toMap(@NotNull @NotNull Object @NotNull ... args)
Convert key/value pairs to map

Parameters:
  `args` - Key/value pairs
Returns:
  Map