| 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.
|
| Modifier and Type | Method and Description |
|---|---|
static Map<Thread,StackTraceElement[]> |
Thread.getAllStackTraces()
Returns a map of stack traces for all live threads.
|
| 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.
|
| Modifier and Type | Method and Description |
|---|---|
Map<AttributedCharacterIterator.Attribute,Object> |
AttributedCharacterIterator.getAttributes()
Returns a map with the attributes defined on the current
character.
|
| 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.
|
| Constructor and Description |
|---|
AttributedString(String text,
Map<? extends AttributedCharacterIterator.Attribute,?> attributes)
Constructs an AttributedString instance with the given text and attributes.
|
| 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. |
| 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.
|
| Modifier and Type | Field and Description |
|---|---|
static Map |
Collections.EMPTY_MAP
The empty map (immutable).
|
| 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.
|
| 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.
|
| 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.
|
| 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. |
| 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. |
| Modifier and Type | Method and Description |
|---|---|
void |
ConcurrentHashMap.putAll(Map<? extends K,? extends V> m) |
| 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.
|
| Modifier and Type | Method and Description |
|---|---|
static <T,K,D,A,M extends Map<K,D>> |
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>> |
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. |
| 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.