Class Maps
java.lang.Object
org.eclipse.collections.impl.factory.Maps
public final class Maps extends Object
This class should be used to create instances of MutableMap, ImmutableMap and FixedSizeMap
Mutable Examples:
MutableMap<String, String> emptyMap = Maps.mutable.empty(); MutableMap<String, String> mapWith = Maps.mutable.with("a", "A", "b", "B", "c", "C"); MutableMap<String, String> mapOf = Maps.mutable.of("a", "A", "b", "B", "c", "C");Immutable Examples:
ImmutableMap<String, String> emptyMap = Maps.immutable.empty(); ImmutableMap<String, String> mapWith = Maps.immutable.with("a", "A", "b", "B", "c", "C"); ImmutableMap<String, String> mapOf = Maps.immutable.of("a", "A", "b", "B", "c", "C");FixedSize Examples:
FixedSizeMap<String, String> emptyMap = Maps.fixedSize.empty(); FixedSizeMap<String, String> mapWith = Maps.fixedSize.with("a", "A", "b", "B", "c", "C"); FixedSizeMap<String, String> mapOf = Maps.fixedSize.of("a", "A", "b", "B", "c", "C");
-
Field Summary
Fields Modifier and Type Field Description static FixedSizeMapFactory
fixedSize
static ImmutableMapFactory
immutable
static MutableMapFactory
mutable
-
Method Summary
Modifier and Type Method Description static <K, V> MutableMap<K,V>
adapt(Map<K,V> map)