Class Maps (1.42.3)

public final class Maps

Static utility methods pertaining to Map instances.

NOTE: this is a copy of a subset of Guava's com.google.common.collect.Maps. The implementation must match as closely as possible to Guava's implementation.

Inheritance

java.lang.Object > Maps

Static Methods

<K,V>newHashMap()

public static HashMap<K,V> <K,V>newHashMap()

Returns a new mutable, empty HashMap instance.

Returns
TypeDescription
HashMap<K,V>

<K,V>newLinkedHashMap()

public static LinkedHashMap<K,V> <K,V>newLinkedHashMap()

Returns a new mutable, empty, insertion-ordered LinkedHashMap instance.

Returns
TypeDescription
LinkedHashMap<K,V>

<K,V>newTreeMap()

public static TreeMap<K,V> <K,V>newTreeMap()

Returns a new mutable, empty TreeMap instance using the natural ordering of its elements.

Returns
TypeDescription
TreeMap<K,V>