org.apache.lucene.util
Class SentinelIntSet
java.lang.Object
  
org.apache.lucene.util.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.
 
  
 
 
| 
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 | 
 
keys
public int[] keys
count
public int count
emptyVal
public final int emptyVal
rehashCount
public int rehashCount
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
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()
 
          Copyright © 2000-2012 Apache Software Foundation.  All Rights Reserved.