public final class Maps extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Maps.MapBuilder<K,V>
Utility Builder class for fluently building maps:
|
| Modifier and Type | Method and Description |
|---|---|
static <K,V> Maps.MapBuilder<K,V> |
of(K key,
V value)
Creates a new map builder with a single entry.
|
public static <K,V> Maps.MapBuilder<K,V> of(K key, V value)
Typical usage:
Map<K,V> result = Maps.of("key1", value1)
.and("key2", value2)
// ...
.build();
K - the maps key typeV - the maps value typekey - the key of an map entry to be addedvalue - the value of map entry to be addedCopyright © 2014–2023 jsonwebtoken.io. All rights reserved.