public class IncreasingBitSet extends Object
Modifier and Type | Field and Description |
---|---|
static int |
MIN_BITS_TO_SHIFT
Minimum number of bits to shift
|
Constructor and Description |
---|
IncreasingBitSet() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(long key)
Add a key if it is possible.
|
long |
cardinality()
Get the number of set bits
|
long |
getLastBaseKey()
Get the last base key (mainly for debugging).
|
boolean |
has(long key)
Check for existence of a key
|
int |
size()
Get the size of the bit set
|
public static final int MIN_BITS_TO_SHIFT
public boolean add(long key)
key
- Key to addpublic long cardinality()
public int size()
public boolean has(long key)
key
- Key to check forpublic long getLastBaseKey()
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.