Constructor and Description |
---|
MapBuilder()
Creates a new MapBuilder object.
|
MapBuilder(Class<T> type)
Creates a new MapBuilder object.
|
Modifier and Type | Method and Description |
---|---|
Map<K,V> |
build()
Returns the Map for this builder.
|
static <K,V> MapBuilder<K,V> |
of(K key,
V value)
Returns a new MapBuilder with the given entry.
|
MapBuilder<K,V> |
put(K key,
V value)
Adds an entry to the map for this builder.
|
MapBuilder<K,V> |
putIf(K key,
Optional<V> value)
Adds an entry to the map for this builder if the given value is present.
|
public MapBuilder()
public MapBuilder(Class<T> type)
public static <K,V> MapBuilder<K,V> of(K key, V value)
public MapBuilder<K,V> put(K key, V value)
public MapBuilder<K,V> putIf(K key, Optional<V> value)
Copyright © 2024 The Cornutum Project. All rights reserved.