Class Dictionaries

java.lang.Object
org.osgi.test.common.dictionary.Dictionaries

public class Dictionaries extends Object
  • Method Details

    • asMap

      public static <K, V> Map<K,V> asMap(Dictionary<K,V> dictionary)
      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

      public static <K, V> Dictionary<K,V> asDictionary(Map<K,V> map)
      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

      public static <K, V> Dictionary<K,V> dictionaryOf()
    • dictionaryOf

      public static <K, V> Dictionary<K,V> dictionaryOf(K k1, V v1)
    • dictionaryOf

      public static <K, V> Dictionary<K,V> dictionaryOf(K k1, V v1, K k2, V v2)
    • dictionaryOf

      public static <K, V> Dictionary<K,V> dictionaryOf(K k1, V v1, K k2, V v2, K k3, V v3)
    • dictionaryOf

      public static <K, V> Dictionary<K,V> dictionaryOf(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
    • asDictionary

      public static <K, V> Dictionary<String,Object> asDictionary(org.osgi.framework.ServiceReference<?> serviceReference)