Package org.osgi.test.common.dictionary
Class Dictionaries
java.lang.Object
org.osgi.test.common.dictionary.Dictionaries
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K,V> Dictionary<K, V> asDictionary(Map<K, V> map) Return a Dictionary wrapper around a Map.static <K,V> Dictionary<String, Object> asDictionary(org.osgi.framework.ServiceReference<?> serviceReference) static <K,V> Map<K, V> asMap(Dictionary<K, V> dictionary) Return a Map wrapper around a Dictionary.static <K,V> Dictionary<K, V> static <K,V> Dictionary<K, V> dictionaryOf(K k1, V v1) static <K,V> Dictionary<K, V> dictionaryOf(K k1, V v1, K k2, V v2) static <K,V> Dictionary<K, V> dictionaryOf(K k1, V v1, K k2, V v2, K k3, V v3) static <K,V> Dictionary<K, V> dictionaryOf(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
-
Method Details
-
asMap
Return a Map wrapper around a Dictionary.- Type Parameters:
K- The type of the key.V- The type of the value.- Parameters:
dictionary- The dictionary to wrap.- Returns:
- A Map object which wraps the specified dictionary. If the specified dictionary can be cast to a Map, then the specified dictionary is returned.
-
asDictionary
Return a Dictionary wrapper around a Map.- Type Parameters:
K- The type of the key.V- The type of the value.- Parameters:
map- The map to wrap.- Returns:
- A Dictionary object which wraps the specified map. If the specified map can be cast to a Dictionary, then the specified map is returned.
-
dictionaryOf
-
dictionaryOf
-
dictionaryOf
-
dictionaryOf
-
dictionaryOf
-
asDictionary
public static <K,V> Dictionary<String,Object> asDictionary(org.osgi.framework.ServiceReference<?> serviceReference)
-