code: public static <K, V> Dictionary<K, V> wrap(Map<K, V> map) {
          if (map instanceof DictionaryAsMap) {
              return ((DictionaryAsMap<K, V>) map).getDictionary();
          }
          return new MapAsDictionary<K, V>(map);
      }
docs: creates a Dictionary-representation of the map. If the map is an instance of {@link DictionaryAsMap} the original
  dictionary is returned to prevent deeper nesting.