| Package | Description |
|---|---|
| java.util |
| Modifier and Type | Interface and Description |
|---|---|
interface |
NavigableMap<K,V>
NavigableMap is a SortedMap with navigation methods answering the closest
matches for specified item.
|
interface |
SortedMap<K,V>
A map that has its keys ordered.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractMap<K,V>
This class is an abstract implementation of the
Map interface. |
class |
HashMap<K,V>
HashMap is an implementation of Map.
|
class |
Hashtable<K,V>
Hashtable associates keys with values.
|
class |
IdentityHashMap<K,V>
IdentityHashMap is a variant on HashMap which tests equality by reference
instead of equality by value.
|
class |
LinkedHashMap<K,V>
LinkedHashMap is a variant of HashMap.
|
class |
TreeMap<K,V>
TreeMap is an implementation of SortedMap.
|
| Modifier and Type | Field and Description |
|---|---|
static Map |
Collections.EMPTY_MAP
An empty immutable instance of
Map. |
| Modifier and Type | Method and Description |
|---|---|
static <K,V> Map<K,V> |
Collections.emptyMap()
Returns a type-safe empty, immutable
Map. |
static <K,V> Map<K,V> |
Collections.singletonMap(K key,
V value)
Returns a Map containing the specified key and value.
|
static <K,V> Map<K,V> |
Collections.synchronizedMap(Map<K,V> map)
Returns a wrapper on the specified map which synchronizes all access to
the map.
|
static <K,V> Map<K,V> |
Collections.unmodifiableMap(Map<? extends K,? extends V> map)
Returns a wrapper on the specified map which throws an
UnsupportedOperationException whenever an attempt is made to
modify the map. |
| Modifier and Type | Method and Description |
|---|---|
static <E> Set<E> |
Collections.newSetFromMap(Map<E,Boolean> map)
Answers a set backed by a map.
|
void |
TreeMap.putAll(Map<? extends K,? extends V> map)
Copies all the mappings in the given map to this map.
|
void |
Map.putAll(Map<? extends K,? extends V> map)
Copies every mapping in the specified
Map to this Map. |
void |
IdentityHashMap.putAll(Map<? extends K,? extends V> map)
Copies all the mappings in the specified map to this map.
|
void |
Hashtable.putAll(Map<? extends K,? extends V> map)
Copies every mapping to this
Hashtable from the specified map. |
void |
HashMap.putAll(Map<? extends K,? extends V> map)
Copies all the mappings in the specified map to this map.
|
void |
AbstractMap.putAll(Map<? extends K,? extends V> map)
Copies every mapping in the specified map to this map.
|
static <K,V> Map<K,V> |
Collections.synchronizedMap(Map<K,V> map)
Returns a wrapper on the specified map which synchronizes all access to
the map.
|
static <K,V> Map<K,V> |
Collections.unmodifiableMap(Map<? extends K,? extends V> map)
Returns a wrapper on the specified map which throws an
UnsupportedOperationException whenever an attempt is made to
modify the map. |
| Constructor and Description |
|---|
HashMap(Map<? extends K,? extends V> map)
Constructs a new
HashMap instance containing the mappings from
the specified map. |
Hashtable(Map<? extends K,? extends V> map)
Constructs a new instance of
Hashtable containing the mappings
from the specified map. |
IdentityHashMap(Map<? extends K,? extends V> map)
Creates an IdentityHashMap using the given map as initial values.
|
LinkedHashMap(Map<? extends K,? extends V> m)
Constructs a new
LinkedHashMap instance containing the mappings
from the specified map. |
TreeMap(Map<? extends K,? extends V> map)
Constructs a new
TreeMap instance containing the mappings from
the specified map and using natural ordering. |
Copyright © 2021. All rights reserved.