Class MinimalMap

    • Method Detail

      • emptyMap

        public static <K,​V> Map<K,​V> emptyMap()
        Gets the empty map representation.
      • put

        public static <K,​V> Map<K,​V> put​(Map<K,​V> map,
                                                     K key,
                                                     V value)
        Puts a new element in a map, returning the (possibly new) map.
      • remove

        public static <K,​V> Map<K,​V> remove​(Map<K,​V> map,
                                                        K key)
        Removes an element from a map, returning the (possibly new) map.
      • get

        @Deprecated
        public static <K,​V> V get​(Map<K,​V> map,
                                        K key)
        Deprecated.
        Since empty maps are no longer represented by null, invoke Map.get(java.lang.Object) directly now.
        Gets an element from a map.
      • containsKey

        @Deprecated
        public static <K,​V> boolean containsKey​(Map<K,​V> map,
                                                      K key)
        Deprecated.
        Since empty maps are no longer represented by null, invoke Map.containsKey(java.lang.Object) directly now.
        Checks if a key is contained in the map.
      • values

        @Deprecated
        public static <K,​V> Collection<V> values​(Map<K,​V> map)
        Deprecated.
        Since empty maps are no longer represented by null, invoke Map.values() directly now.
        Gets the value collection.
      • valuesCopy

        public static <K,​V> Collection<V> valuesCopy​(Map<K,​V> map)
        Performs a shallow copy of the value collection.
      • copy

        public static <K,​V> Map<K,​V> copy​(Map<K,​V> map)
        Performs a shallow copy of a map. The map is assumed to have been created by MinimalMap and to be used through MinimalMap.
      • unmodifiable

        public static <K,​V> Map<K,​V> unmodifiable​(Map<K,​V> map)
        Gets an unmodifiable wrapper around this map. May or may not wrap this map itself.