Class SentinelIntSet
- java.lang.Object
-
- org.apache.lucene.search.grouping.SentinelIntSet
-
public class SentinelIntSet extends Object
A native int set where one value is reserved to mean "EMPTY"- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Field Summary
Fields Modifier and Type Field Description int
count
int
emptyVal
int[]
keys
int
rehashCount
-
Constructor Summary
Constructors Constructor Description SentinelIntSet(int size, int emptyVal)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
exists(int key)
int
find(int key)
returns the slot for this key, or -slot-1 if not foundint
getSlot(int key)
returns the slot for this keyint
hash(int key)
int
put(int key)
void
rehash()
int
size()
-
-
-
Method Detail
-
clear
public void clear()
-
hash
public int hash(int key)
-
size
public int size()
-
getSlot
public int getSlot(int key)
returns the slot for this key
-
find
public int find(int key)
returns the slot for this key, or -slot-1 if not found
-
exists
public boolean exists(int key)
-
put
public int put(int key)
-
rehash
public void rehash()
-
-