Class Maps


  • public final class Maps
    extends Object
    Static utility methods pertaining to Map instances.

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

    Since:
    1.14
    Author:
    Yaniv Inbar
    • Method Detail

      • newHashMap

        public static <K,​V> HashMap<K,​V> newHashMap()
        Returns a new mutable, empty HashMap instance.
      • newLinkedHashMap

        public static <K,​V> LinkedHashMap<K,​V> newLinkedHashMap()
        Returns a new mutable, empty, insertion-ordered LinkedHashMap instance.
      • newTreeMap

        public static <K extends Comparable<?>,​V> TreeMap<K,​V> newTreeMap()
        Returns a new mutable, empty TreeMap instance using the natural ordering of its elements.