## org.apache.lucene.search.grouping
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
`int` `count`
`int` `emptyVal`
`int[]` `keys`
`int` `rehashCount`

Constructor Summary
`SentinelIntSet(int size, int emptyVal)`

Method Summary
`void` `clear()`
`boolean` `exists(int key)`
`int` `find(int key)` returns the slot for this key, or -slot-1 if not found
`int` `getSlot(int key)` returns the slot for this key
`int` `hash(int key)`
`int` `put(int key)`
`void` `rehash()`
`int` `size()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### keys

    public int[] keys

### count

    public int count

### emptyVal

    public final int emptyVal

### rehashCount

    public int rehashCount

Constructor Detail

### SentinelIntSet

    public SentinelIntSet(int size,
                          int emptyVal)

Parameters:
  `size` - The minimum number of elements this set should be able to hold without re-hashing (i.e. the slots are guaranteed not to change)
  `emptyVal` - The integer value to use for EMPTY

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()