-
public class MapBuilderUtility class for creating maps
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classMapBuilder.Builder
-
Method Summary
Modifier and Type Method Description static <K, V> HashMap<K, V>newHashMap()Creates an instance of {@code HashMap}static <K, V> Map<K, V>of()Returns the empty map. static <K, V> Map<K, V>of(K k1, V v1)Returns map containing a single entry. static <K, V> Map<K, V>of(K k1, V v1, K k2, V v2)Returns map containing the given entries. static <K, V> Map<K, V>of(K k1, V v1, K k2, V v2, K k3, V v3)Returns map containing the given entries. static <K, V> Map<K, V>of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)Returns map containing the given entries. static <K, V> Map<K, V>of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5)Returns map containing the given entries. static <K, V> Map<K, V>of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6)Returns map containing the given entries. static <K, V> Map<K, V>of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7)Returns map containing the given entries. static <K, V> MapBuilder.Builder<K, V>builder()Returns map containing the given entries. -
-
Method Detail
-
newHashMap
static <K, V> HashMap<K, V> newHashMap()
Creates an instance of
{@code HashMap}
-
of
static <K, V> Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3)
Returns map containing the given entries.
-
of
static <K, V> Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
Returns map containing the given entries.
-
of
static <K, V> Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5)
Returns map containing the given entries.
-
of
static <K, V> Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6)
Returns map containing the given entries.
-
of
static <K, V> Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7)
Returns map containing the given entries.
-
builder
static <K, V> MapBuilder.Builder<K, V> builder()
Returns map containing the given entries.
-
-
-
-