- All Superinterfaces:
AutoCloseable,Closeable,Releasable
- All Known Implementing Classes:
LongHash
A hash table mapping keys (primitive long type) to values to ids, also of
primitive long type. The id's start at 0, and increment monotonically as
unique keys are added.
-
Method Summary
Modifier and TypeMethodDescriptionlongadd(long key) Adds the given key to the table.longfind(long key) Finds the id associated with the given key, or -1 is the key is not contained in the hash.longget(long id) Gets a key from the given id value.longsize()Returns the size (number of key/value pairs) in the table.Methods inherited from interface org.elasticsearch.core.Releasable
close
-
Method Details
-
get
long get(long id) Gets a key from the given id value. -
find
long find(long key) Finds the id associated with the given key, or -1 is the key is not contained in the hash. -
add
long add(long key) Adds the given key to the table. Return its newly allocated id if it wasn't in the table yet, or-1-idif it was already present in the table. -
size
long size()Returns the size (number of key/value pairs) in the table.
-