public final class HppcMaps
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
HppcMaps.Object |
Modifier and Type | Method and Description |
---|---|
static <K,V> com.carrotsearch.hppc.ObjectObjectHashMap<K,V> |
ensureNoNullKeys(int expectedElements)
Wraps the given map and prevent adding of
null keys. |
static <T> java.lang.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()
Returns a new map with a default initial capacity.
|
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> |
newNoNullKeysMap()
Returns a map like
newMap() 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 |
public static <K,V> com.carrotsearch.hppc.ObjectObjectHashMap<K,V> newMap(int expectedElements)
expectedElements
- The expected number of elements guaranteed not to cause buffer
expansion (inclusive).public static <K,V> com.carrotsearch.hppc.ObjectObjectHashMap<K,V> newMap()
public static <K,V> com.carrotsearch.hppc.ObjectObjectHashMap<K,V> newNoNullKeysMap()
newMap()
that does not accept null
keyspublic static <K,V> com.carrotsearch.hppc.ObjectObjectHashMap<K,V> newNoNullKeysMap(int expectedElements)
newMap(int)
that does not accept null
keysexpectedElements
- The expected number of elements guaranteed not to cause buffer
expansion (inclusive).public static <K,V> com.carrotsearch.hppc.ObjectObjectHashMap<K,V> ensureNoNullKeys(int expectedElements)
null
keys.expectedElements
- The expected number of elements guaranteed not to cause buffer
expansion (inclusive).public static <T> java.lang.Iterable<T> intersection(com.carrotsearch.hppc.ObjectLookupContainer<T> container1, com.carrotsearch.hppc.ObjectLookupContainer<T> container2)