Class Map

java.lang.Object
org.elasticsearch.core.Map

public class Map extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    Map()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <K, V> Map<K,V>
    copyOf(Map<? extends K,? extends V> map)
    Returns an unmodifiable Map containing the entries of the given Map.
    static <K, V> Map.Entry<K,V>
    entry(K k, V v)
    Returns an unmodifiable Map.Entry for the provided key and value.
    static <K, V> Map<K,V>
    of()
    Returns an unmodifiable map containing one mapping.
    static <K, V> Map<K,V>
    of(K k1, V v1)
    Returns an unmodifiable map containing one mapping.
    static <K, V> Map<K,V>
    of(K k1, V v1, K k2, V v2)
    Returns an unmodifiable map containing two mappings.
    static <K, V> Map<K,V>
    of(K k1, V v1, K k2, V v2, K k3, V v3)
    Returns an unmodifiable map containing three mappings.
    static <K, V> Map<K,V>
    of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
    Returns an unmodifiable map containing four mappings.
    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 an unmodifiable map containing five mappings.
    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 an unmodifiable map containing six mappings.
    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 an unmodifiable map containing seven mappings.
    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, K k8, V v8)
    Returns an unmodifiable map containing eight mappings.
    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, K k8, V v8, K k9, V v9)
    Returns an unmodifiable map containing nine mappings.
    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, K k8, V v8, K k9, V v9, K k10, V v10)
    Returns an unmodifiable map containing ten mappings.
    static <K, V> Map<K,V>
    ofEntries(Map.Entry<? extends K,? extends V>... entries)
    Returns an unmodifiable map containing keys and values extracted from the given entries.

    Methods inherited from class java.lang.Object

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

    • Map

      public Map()
  • Method Details

    • of

      public static <K, V> Map<K,V> of()
      Returns an unmodifiable map containing one mapping.
    • of

      public static <K, V> Map<K,V> of(K k1, V v1)
      Returns an unmodifiable map containing one mapping.
    • of

      public static <K, V> Map<K,V> of(K k1, V v1, K k2, V v2)
      Returns an unmodifiable map containing two mappings.
    • of

      public static <K, V> Map<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3)
      Returns an unmodifiable map containing three mappings.
    • of

      public static <K, V> Map<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
      Returns an unmodifiable map containing four mappings.
    • of

      public 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 an unmodifiable map containing five mappings.
    • of

      public 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 an unmodifiable map containing six mappings.
    • of

      public 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 an unmodifiable map containing seven mappings.
    • of

      public 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, K k8, V v8)
      Returns an unmodifiable map containing eight mappings.
    • of

      public 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, K k8, V v8, K k9, V v9)
      Returns an unmodifiable map containing nine mappings.
    • of

      public 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, K k8, V v8, K k9, V v9, K k10, V v10)
      Returns an unmodifiable map containing ten mappings.
    • ofEntries

      @SafeVarargs public static <K, V> Map<K,V> ofEntries(Map.Entry<? extends K,? extends V>... entries)
      Returns an unmodifiable map containing keys and values extracted from the given entries.
      Type Parameters:
      K - the Map's key type
      V - the Map's value type
      Parameters:
      entries - Map.Entrys containing the keys and values from which the map is populated
      Returns:
      a Map containing the specified mappings
    • entry

      public static <K, V> Map.Entry<K,V> entry(K k, V v)
      Returns an unmodifiable Map.Entry for the provided key and value.
    • copyOf

      public static <K, V> Map<K,V> copyOf(Map<? extends K,? extends V> map)
      Returns an unmodifiable Map containing the entries of the given Map.
      Type Parameters:
      K - the Map's key type
      V - the Map's value type
      Parameters:
      map - a Map from which entries are drawn, must be non-null
      Returns:
      a Map containing the entries of the given Map