Class HppcMaps

java.lang.Object
org.elasticsearch.common.collect.HppcMaps

public final class HppcMaps extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> Iterable<T>
    intersection(com.carrotsearch.hppc.ObjectLookupContainer<T> container1, com.carrotsearch.hppc.ObjectLookupContainer<T> container2)
     
    static <K, V> com.carrotsearch.hppc.ObjectObjectHashMap<K,V>
    newMap(int expectedElements)
    Returns a new map with the given number of expected elements.
    static <K, V> com.carrotsearch.hppc.ObjectObjectHashMap<K,V>
    Returns a map like newMap(int) that does not accept null keys
    static <K, V> com.carrotsearch.hppc.ObjectObjectHashMap<K,V>
    newNoNullKeysMap(int expectedElements)
    Returns a map like newMap(int) that does not accept null keys

    Methods inherited from class java.lang.Object

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

    • newMap

      public static <K, V> com.carrotsearch.hppc.ObjectObjectHashMap<K,V> newMap(int expectedElements)
      Returns a new map with the given number of expected elements.
      Parameters:
      expectedElements - The expected number of elements guaranteed not to cause buffer expansion (inclusive).
    • newNoNullKeysMap

      public static <K, V> com.carrotsearch.hppc.ObjectObjectHashMap<K,V> newNoNullKeysMap()
      Returns a map like newMap(int) that does not accept null keys
    • newNoNullKeysMap

      public static <K, V> com.carrotsearch.hppc.ObjectObjectHashMap<K,V> newNoNullKeysMap(int expectedElements)
      Returns a map like newMap(int) that does not accept null keys
      Parameters:
      expectedElements - The expected number of elements guaranteed not to cause buffer expansion (inclusive).
    • intersection

      public static <T> Iterable<T> intersection(com.carrotsearch.hppc.ObjectLookupContainer<T> container1, com.carrotsearch.hppc.ObjectLookupContainer<T> container2)
      Returns:
      an intersection view over the two specified containers (which can be KeyContainer or ObjectHashSet).