Class ImmutableOpenMap.Builder<KType,​VType>

java.lang.Object
org.elasticsearch.common.collect.ImmutableOpenMap.Builder<KType,​VType>
All Implemented Interfaces:
com.carrotsearch.hppc.ObjectObjectAssociativeContainer<KType,​VType>, com.carrotsearch.hppc.ObjectObjectMap<KType,​VType>, Iterable<com.carrotsearch.hppc.cursors.ObjectObjectCursor<KType,​VType>>
Enclosing class:
ImmutableOpenMap<KType,​VType>

public static class ImmutableOpenMap.Builder<KType,​VType> extends Object implements com.carrotsearch.hppc.ObjectObjectMap<KType,​VType>
  • Constructor Details

    • Builder

      public Builder()
    • Builder

      public Builder(int size)
    • Builder

      public Builder(ImmutableOpenMap<KType,​VType> map)
  • Method Details

    • build

      public ImmutableOpenMap<KType,​VType> build()
      Builds a new instance of the
    • putAll

      public ImmutableOpenMap.Builder<KType,​VType> putAll(Map<KType,​VType> map)
      Puts all the entries in the map to the builder.
    • fPut

      public ImmutableOpenMap.Builder<KType,​VType> fPut(KType key, VType value)
      A put operation that can be used in the fluent pattern.
    • put

      public VType put(KType key, VType value)
      Specified by:
      put in interface com.carrotsearch.hppc.ObjectObjectMap<KType,​VType>
    • get

      public VType get(KType key)
      Specified by:
      get in interface com.carrotsearch.hppc.ObjectObjectMap<KType,​VType>
    • getOrDefault

      public VType getOrDefault(KType kType, VType vType)
      Specified by:
      getOrDefault in interface com.carrotsearch.hppc.ObjectObjectMap<KType,​VType>
    • putAll

      public int putAll(com.carrotsearch.hppc.ObjectObjectAssociativeContainer<? extends KType,​? extends VType> container)
      Specified by:
      putAll in interface com.carrotsearch.hppc.ObjectObjectMap<KType,​VType>
    • putAll

      public int putAll(Iterable<? extends com.carrotsearch.hppc.cursors.ObjectObjectCursor<? extends KType,​? extends VType>> iterable)
      Specified by:
      putAll in interface com.carrotsearch.hppc.ObjectObjectMap<KType,​VType>
    • fRemove

      public ImmutableOpenMap.Builder<KType,​VType> fRemove(KType key)
      Remove that can be used in the fluent pattern.
    • remove

      public VType remove(KType key)
      Specified by:
      remove in interface com.carrotsearch.hppc.ObjectObjectMap<KType,​VType>
    • iterator

      public Iterator<com.carrotsearch.hppc.cursors.ObjectObjectCursor<KType,​VType>> iterator()
      Specified by:
      iterator in interface Iterable<KType>
      Specified by:
      iterator in interface com.carrotsearch.hppc.ObjectObjectAssociativeContainer<KType,​VType>
    • containsKey

      public boolean containsKey(KType key)
      Specified by:
      containsKey in interface com.carrotsearch.hppc.ObjectObjectAssociativeContainer<KType,​VType>
    • size

      public int size()
      Specified by:
      size in interface com.carrotsearch.hppc.ObjectObjectAssociativeContainer<KType,​VType>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface com.carrotsearch.hppc.ObjectObjectAssociativeContainer<KType,​VType>
    • removeAll

      public int removeAll(com.carrotsearch.hppc.ObjectContainer<? super KType> container)
      Specified by:
      removeAll in interface com.carrotsearch.hppc.ObjectObjectAssociativeContainer<KType,​VType>
    • removeAll

      public int removeAll(com.carrotsearch.hppc.predicates.ObjectPredicate<? super KType> predicate)
      Specified by:
      removeAll in interface com.carrotsearch.hppc.ObjectObjectAssociativeContainer<KType,​VType>
    • forEach

      public <T extends com.carrotsearch.hppc.procedures.ObjectObjectProcedure<? super KType,​ ? super VType>> T forEach(T procedure)
      Specified by:
      forEach in interface com.carrotsearch.hppc.ObjectObjectAssociativeContainer<KType,​VType>
    • clear

      public void clear()
      Specified by:
      clear in interface com.carrotsearch.hppc.ObjectObjectMap<KType,​VType>
    • keys

      public com.carrotsearch.hppc.ObjectCollection<KType> keys()
      Specified by:
      keys in interface com.carrotsearch.hppc.ObjectObjectAssociativeContainer<KType,​VType>
    • values

      public com.carrotsearch.hppc.ObjectContainer<VType> values()
      Specified by:
      values in interface com.carrotsearch.hppc.ObjectObjectAssociativeContainer<KType,​VType>
    • cast

      public <K,​ V> ImmutableOpenMap.Builder<K,​V> cast()
    • removeAll

      public int removeAll(com.carrotsearch.hppc.predicates.ObjectObjectPredicate<? super KType,​? super VType> predicate)
      Specified by:
      removeAll in interface com.carrotsearch.hppc.ObjectObjectAssociativeContainer<KType,​VType>
    • forEach

      public <T extends com.carrotsearch.hppc.predicates.ObjectObjectPredicate<? super KType,​ ? super VType>> T forEach(T predicate)
      Specified by:
      forEach in interface com.carrotsearch.hppc.ObjectObjectAssociativeContainer<KType,​VType>
    • indexOf

      public int indexOf(KType key)
      Specified by:
      indexOf in interface com.carrotsearch.hppc.ObjectObjectMap<KType,​VType>
    • indexExists

      public boolean indexExists(int index)
      Specified by:
      indexExists in interface com.carrotsearch.hppc.ObjectObjectMap<KType,​VType>
    • indexGet

      public VType indexGet(int index)
      Specified by:
      indexGet in interface com.carrotsearch.hppc.ObjectObjectMap<KType,​VType>
    • indexReplace

      public VType indexReplace(int index, VType newValue)
      Specified by:
      indexReplace in interface com.carrotsearch.hppc.ObjectObjectMap<KType,​VType>
    • indexInsert

      public void indexInsert(int index, KType key, VType value)
      Specified by:
      indexInsert in interface com.carrotsearch.hppc.ObjectObjectMap<KType,​VType>
    • release

      public void release()
      Specified by:
      release in interface com.carrotsearch.hppc.ObjectObjectMap<KType,​VType>
    • visualizeKeyDistribution

      public String visualizeKeyDistribution(int characters)
      Specified by:
      visualizeKeyDistribution in interface com.carrotsearch.hppc.ObjectObjectMap<KType,​VType>