Package org.elasticsearch.common.collect
Class HppcMaps
java.lang.Object
org.elasticsearch.common.collect.HppcMaps
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <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 likenewMap(int)
that does not acceptnull
keysstatic <K,
V> com.carrotsearch.hppc.ObjectObjectHashMap<K, V> newNoNullKeysMap
(int expectedElements) Returns a map likenewMap(int)
that does not acceptnull
keys
-
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 likenewMap(int)
that does not acceptnull
keys -
newNoNullKeysMap
public static <K,V> com.carrotsearch.hppc.ObjectObjectHashMap<K,V> newNoNullKeysMap(int expectedElements) Returns a map likenewMap(int)
that does not acceptnull
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).
-