Class Maps


  • public final class Maps
    extends java.lang.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
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Maps()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <K,​V>
      java.util.HashMap<K,​V>
      newHashMap()
      Returns a new mutable, empty HashMap instance.
      static <K,​V>
      java.util.LinkedHashMap<K,​V>
      newLinkedHashMap()
      Returns a new mutable, empty, insertion-ordered LinkedHashMap instance.
      static <K extends java.lang.Comparable<?>,​V>
      java.util.TreeMap<K,​V>
      newTreeMap()
      Returns a new mutable, empty TreeMap instance using the natural ordering of its elements.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Maps

        private Maps()
    • Method Detail

      • newHashMap

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

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

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