## Uses of Interface
java.util.Map

- Packages that use Map
  Package | Description
  --- | ---
  java.lang |
  java.net |
  java.text |
  java.util |
  java.util.concurrent | Utility classes commonly useful in concurrent programming.
  java.util.stream | Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.

- - ### Uses of Map in java.lang

    Methods in java.lang that return Map
    Modifier and Type | Method and Description
    --- | ---
    `static Map<Thread,StackTraceElement[]>` | Thread.`getAllStackTraces()` Returns a map of stack traces for all live threads.

  - ### Uses of Map in java.net

    Methods in java.net that return Map
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,List<String>>` | URLConnection.`getHeaderFields()` Returns an unmodifiable Map of the header fields.
    `Map<String,List<String>>` | URLConnection.`getRequestProperties()` Returns an unmodifiable Map of general request properties for this connection.

  - ### Uses of Map in java.text

    Methods in java.text that return Map
    Modifier and Type | Method and Description
    --- | ---
    `Map<AttributedCharacterIterator.Attribute,Object>` | AttributedCharacterIterator.`getAttributes()` Returns a map with the attributes defined on the current character.

    Methods in java.text with parameters of type Map
    Modifier and Type | Method and Description
    --- | ---
    `void` | AttributedString.`addAttributes(Map<? extends AttributedCharacterIterator.Attribute,?> attributes, int beginIndex, int endIndex)` Adds a set of attributes to a subrange of the string.

    Constructors in java.text with parameters of type Map
    Constructor and Description
    `AttributedString(String text, Map<? extends AttributedCharacterIterator.Attribute,?> attributes)` Constructs an AttributedString instance with the given text and attributes.

  - ### Uses of Map in java.util

    Subinterfaces of Map in java.util
    Modifier and Type | Interface and Description
    --- | ---
    `interface` | `NavigableMap<K,V>` A `SortedMap` extended with navigation methods returning the closest matches for given search targets.
    `interface` | `SortedMap<K,V>` A `Map` that further provides a total ordering on its keys.

    Classes in java.util that implement Map
    Modifier and Type | Class and Description
    --- | ---
    `class` | `AbstractMap<K,V>` This class provides a skeletal implementation of the `Map` interface, to minimize the effort required to implement this interface.
    `class` | `EnumMap<K extends Enum<K>,V>` A specialized `Map` implementation for use with enum type keys.
    `class` | `HashMap<K,V>` Hash table based implementation of the `Map` interface.
    `class` | `Hashtable<K,V>` This class implements a hash table, which maps keys to values.
    `class` | `IdentityHashMap<K,V>` This class implements the `Map` interface with a hash table, using reference-equality in place of object-equality when comparing keys (and values).
    `class` | `LinkedHashMap<K,V>` Hash table and linked list implementation of the `Map` interface, with predictable iteration order.
    `class` | `Properties` The `Properties` class represents a persistent set of properties.
    `class` | `TreeMap<K,V>` A Red-Black tree based `NavigableMap` implementation.
    `class` | `WeakHashMap<K,V>` Hash table based implementation of the `Map` interface, with weak keys.

    Fields in java.util declared as Map
    Modifier and Type | Field and Description
    --- | ---
    `static Map` | Collections.`EMPTY_MAP` The empty map (immutable).

    Methods in java.util that return Map
    Modifier and Type | Method and Description
    --- | ---
    `static <K,V> Map<K,V>` | Collections.`checkedMap(Map<K,V> m, Class<K> keyType, Class<V> valueType)` Returns a dynamically typesafe view of the specified map.
    `static <K,V> Map<K,V>` | Collections.`emptyMap()` Returns the empty map (immutable).
    `Map<String,Integer>` | Calendar.`getDisplayNames(int field, int style, Locale locale)` Returns a `Map` containing all names of the calendar `field` in the given `style` and `locale` and their corresponding field values.
    `static <K,V> Map<K,V>` | Collections.`singletonMap(K key, V value)` Returns an immutable map, mapping only the specified key to the specified value.
    `static <K,V> Map<K,V>` | Collections.`synchronizedMap(Map<K,V> m)` Returns a synchronized (thread-safe) map backed by the specified map.
    `static <K,V> Map<K,V>` | Collections.`unmodifiableMap(Map<? extends K,? extends V> m)` Returns an unmodifiable view of the specified map.

    Methods in java.util with parameters of type Map
    Modifier and Type | Method and Description
    --- | ---
    `static <K,V> Map<K,V>` | Collections.`checkedMap(Map<K,V> m, Class<K> keyType, Class<V> valueType)` Returns a dynamically typesafe view of the specified map.
    `static <E> Set<E>` | Collections.`newSetFromMap(Map<E,Boolean> map)` Returns a set backed by the specified map.
    `void` | WeakHashMap.`putAll(Map<? extends K,? extends V> m)` Copies all of the mappings from the specified map to this map.
    `void` | TreeMap.`putAll(Map<? extends K,? extends V> map)` Copies all of the mappings from the specified map to this map.
    `void` | Map.`putAll(Map<? extends K,? extends V> m)` Copies all of the mappings from the specified map to this map (optional operation).
    `void` | IdentityHashMap.`putAll(Map<? extends K,? extends V> m)` Copies all of the mappings from the specified map to this map.
    `void` | Hashtable.`putAll(Map<? extends K,? extends V> t)` Copies all of the mappings from the specified map to this hashtable.
    `void` | HashMap.`putAll(Map<? extends K,? extends V> m)` Copies all of the mappings from the specified map to this map.
    `void` | EnumMap.`putAll(Map<? extends K,? extends V> m)` Copies all of the mappings from the specified map to this map.
    `void` | AbstractMap.`putAll(Map<? extends K,? extends V> m)` Copies all of the mappings from the specified map to this map (optional operation).
    `static <K,V> Map<K,V>` | Collections.`synchronizedMap(Map<K,V> m)` Returns a synchronized (thread-safe) map backed by the specified map.
    `static <K,V> Map<K,V>` | Collections.`unmodifiableMap(Map<? extends K,? extends V> m)` Returns an unmodifiable view of the specified map.

    Constructors in java.util with parameters of type Map
    Constructor and Description
    `EnumMap(Map<K,? extends V> m)` Creates an enum map initialized from the specified map.
    `HashMap(Map<? extends K,? extends V> m)` Constructs a new `HashMap` with the same mappings as the specified `Map`.
    `Hashtable(Map<? extends K,? extends V> t)` Constructs a new hashtable with the same mappings as the given Map.
    `IdentityHashMap(Map<? extends K,? extends V> m)` Constructs a new identity hash map containing the keys-value mappings in the specified map.
    `LinkedHashMap(Map<? extends K,? extends V> m)` Constructs an insertion-ordered `LinkedHashMap` instance with the same mappings as the specified map.
    `TreeMap(Map<? extends K,? extends V> m)` Constructs a new tree map containing the same mappings as the given map, ordered according to the natural ordering of its keys.
    `WeakHashMap(Map<? extends K,? extends V> m)` Constructs a new `WeakHashMap` with the same mappings as the specified map.

  - ### Uses of Map in java.util.concurrent

    Subinterfaces of Map in java.util.concurrent
    Modifier and Type | Interface and Description
    --- | ---
    `interface` | `ConcurrentMap<K,V>` A `Map` providing additional atomic `putIfAbsent`, `remove`, and `replace` methods.
    `interface` | `ConcurrentNavigableMap<K,V>` A `ConcurrentMap` supporting `NavigableMap` operations, and recursively so for its navigable sub-maps.

    Classes in java.util.concurrent that implement Map
    Modifier and Type | Class and Description
    --- | ---
    `class` | `ConcurrentHashMap<K,V>` A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updates.
    `class` | `ConcurrentSkipListMap<K,V>` A scalable concurrent `ConcurrentNavigableMap` implementation.

    Methods in java.util.concurrent with parameters of type Map
    Modifier and Type | Method and Description
    --- | ---
    `void` | ConcurrentHashMap.`putAll(Map<? extends K,? extends V> m)`

    Constructors in java.util.concurrent with parameters of type Map
    Constructor and Description
    `ConcurrentHashMap(Map<? extends K,? extends V> m)` Creates a new map with the same mappings as the given map.
    `ConcurrentSkipListMap(Map<? extends K,? extends V> m)` Constructs a new map containing the same mappings as the given map, sorted according to the natural ordering of the keys.

  - ### Uses of Map in java.util.stream

    Methods in java.util.stream with type parameters of type Map
    Modifier and Type | Method and Description
    --- | ---
    `static <T,K,D,A,M extends Map<K,D>> Collector<T,?,M>` | Collectors.`groupingBy(Function<? super T,? extends K> classifier, Supplier<M> mapFactory, Collector<? super T,A,D> downstream)` Returns a `Collector` implementing a cascaded "group by" operation on input elements of type `T`, grouping elements according to a classification function, and then performing a reduction operation on the values associated with a given key using the specified downstream `Collector`.
    `static <T,K,U,M extends Map<K,U>> Collector<T,?,M>` | Collectors.`toMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends U> valueMapper, BinaryOperator<U> mergeFunction, Supplier<M> mapSupplier)` Returns a `Collector` that accumulates elements into a `Map` whose keys and values are the result of applying the provided mapping functions to the input elements.

    Methods in java.util.stream that return types with arguments of type Map
    Modifier and Type | Method and Description
    --- | ---
    `static <T,K> Collector<T,?,Map<K,List<T>>>` | Collectors.`groupingBy(Function<? super T,? extends K> classifier)` Returns a `Collector` implementing a "group by" operation on input elements of type `T`, grouping elements according to a classification function, and returning the results in a `Map`.
    `static <T,K,A,D> Collector<T,?,Map<K,D>>` | Collectors.`groupingBy(Function<? super T,? extends K> classifier, Collector<? super T,A,D> downstream)` Returns a `Collector` implementing a cascaded "group by" operation on input elements of type `T`, grouping elements according to a classification function, and then performing a reduction operation on the values associated with a given key using the specified downstream `Collector`.
    `static <T> Collector<T,?,Map<Boolean,List<T>>>` | Collectors.`partitioningBy(Predicate<? super T> predicate)` Returns a `Collector` which partitions the input elements according to a `Predicate`, and organizes them into a `Map<Boolean, List<T>>`.
    `static <T,D,A> Collector<T,?,Map<Boolean,D>>` | Collectors.`partitioningBy(Predicate<? super T> predicate, Collector<? super T,A,D> downstream)` Returns a `Collector` which partitions the input elements according to a `Predicate`, reduces the values in each partition according to another `Collector`, and organizes them into a `Map<Boolean, D>` whose values are the result of the downstream reduction.
    `static <T,K,U> Collector<T,?,Map<K,U>>` | Collectors.`toMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends U> valueMapper)` Returns a `Collector` that accumulates elements into a `Map` whose keys and values are the result of applying the provided mapping functions to the input elements.
    `static <T,K,U> Collector<T,?,Map<K,U>>` | Collectors.`toMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends U> valueMapper, BinaryOperator<U> mergeFunction)` Returns a `Collector` that accumulates elements into a `Map` whose keys and values are the result of applying the provided mapping functions to the input elements.

Copyright © 2025 API Design. All Rights Reserved.