K
- the type of the keys in the map to buildV
- the type of the values in the map to buildpublic static final class Maps.MapBuilder<K,V>
extends java.lang.Object
Constructor and Description |
---|
MapBuilder() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<K,V> |
build()
Returns the built map.
|
Maps.MapBuilder<K,V> |
put(K key,
V value)
Puts the given key-value entry into the map and returns this builder to allow for method chaining.
|
Maps.MapBuilder<K,V> |
putAll(java.util.Map<? extends K,? extends V> map)
Puts all the contents of a map into the builder.
|
public Maps.MapBuilder<K,V> put(K key, V value)
key
- the entry's keyvalue
- the entry's valuepublic Maps.MapBuilder<K,V> putAll(java.util.Map<? extends K,? extends V> map)
map
- the map whose contents to add