Package org.apache.orc.util
Class BloomFilter.BitSet
java.lang.Object
org.apache.orc.util.BloomFilter.BitSet
- Enclosing class:
- BloomFilter
Bare metal bit set implementation. For performance reasons, this implementation does not check
for index bounds nor expand the bit set size if the specified index is greater than the size.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongbitSize()Number of bitsvoidclear()Clear the bit set.booleanbooleanget(int index) Returns true if the bit is set in the specified index.long[]getData()inthashCode()voidputAll(BloomFilter.BitSet array) Combines the two BitArrays using bitwise OR.voidset(int index) Sets the bit at specified index.
-
Constructor Details
-
BitSet
public BitSet(long bits) -
BitSet
public BitSet(long[] data) Deserialize long array as bit set.- Parameters:
data- - bit array
-
-
Method Details
-
set
public void set(int index) Sets the bit at specified index.- Parameters:
index- - position
-
get
public boolean get(int index) Returns true if the bit is set in the specified index.- Parameters:
index- - position- Returns:
- - value at the bit position
-
bitSize
public long bitSize()Number of bits -
getData
public long[] getData() -
putAll
Combines the two BitArrays using bitwise OR. -
clear
public void clear()Clear the bit set. -
equals
-
hashCode
public int hashCode()
-