Class MapUtil
- java.lang.Object
-
- org.apache.sling.testing.mock.osgi.MapUtil
-
public final class MapUtil extends Object
Map util methods.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @Nullable Dictionary<String,Object>
toDictionary(@NotNull Object @NotNull ... args)
Convert key/value pairs to dictionarystatic <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 mapstatic <T,U>
@Nullable Map<T,U>toMap(@Nullable Dictionary<T,U> dictionary)
Convert Dictionary to map
-
-
-
Method Detail
-
toDictionary
@Nullable public static <T,U> @Nullable Dictionary<T,U> toDictionary(@Nullable @Nullable Map<T,U> map)
Convert map to dictionary.- Type Parameters:
T
- KeyU
- 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
- KeyU
- 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
-
-