Class SentinelInt32Set
A native
To iterate over the integers held in this set, simply use code like this:
SentinelIntSet set = ...
foreach (int v in set.keys)
{
if (v == set.EmptyVal)
continue;
//use v...
}
NOTE: This was SentinelIntSet in Lucene
@lucene.internal
Inheritance
Assembly: DistributedLucene.Net.dll
Syntax
public class SentinelInt32Set : object
Constructors
Name | Description |
---|---|
SentinelInt32Set(Int32, Int32) |
Properties
Name | Description |
---|---|
Count | The number of integers in this set. |
EmptyVal | |
Keys | A power-of-2 over-sized array holding the integers in the set along with empty values. |
RehashCount | The count at which a rehash should be done. |
Methods
Name | Description |
---|---|
Clear() | |
Exists(Int32) | Does this set contain the specified integer? |
Find(Int32) | (internal) Returns the slot for this key, or -slot-1 if not found. |
GetSlot(Int32) | (internal) Returns the slot for this key. |
Hash(Int32) | (internal) Return the hash for the key. The default implementation just returns the key, which is not appropriate for general purpose use. |
Put(Int32) | Puts this integer (key) in the set, and returns the slot index it was added to. It rehashes if adding it would make the set more than 75% full. |
Rehash() | (internal) Rehashes by doubling key (int[]) and filling with the old values. |