Class MapUtil
java.lang.Object
org.apache.sling.testing.mock.osgi.MapUtil
Map util methods.
-
Method Summary
Modifier and TypeMethodDescriptionstatic @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.Convert key/value pairs to mapstatic <T,
U> @Nullable Map<T, U> toMap
(@Nullable Dictionary<T, U> dictionary) Convert Dictionary to map
-
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
- 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
-
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
-