K - The type of the keyV - The type of the valuepublic class MapBuilder<K,V> extends Object
Map class.| Constructor and Description |
|---|
MapBuilder()
|
MapBuilder(Map<K,V> map)
Creates a new map builder that returns the given map on
get(). |
| Modifier and Type | Method and Description |
|---|---|
Map<K,V> |
get()
Returns the populated map.
|
MapBuilder<K,V> |
put(K key,
V value)
Stores the given key value pair in the map.
|
MapBuilder<K,V> |
putAll(Map<? extends K,? extends V> map)
Stores all elements of the given map in the map being populated.
|
public MapBuilder<K,V> put(K key, V value)
key - The key of the valuevalue - The value to storeCopyright © 2026. All rights reserved.