java.lang.Object
org.bitlap.roaringbitmap.buffer.BufferBitSetUtil
This class provides convenience functions to manipulate BitSet and MutableRoaringBitmap objects.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static MutableRoaringBitmapbitmapOf(long[] words) Generate a MutableRoaringBitmap out of a long[], each long using little-endian representation of its bitsstatic MutableRoaringBitmapbitmapOf(ByteBuffer bb) Efficiently generate a RoaringBitmap from an uncompressed byte array or ByteBuffer This method tries to minimise all kinds of memory allocationstatic MutableRoaringBitmapbitmapOf(ByteBuffer bb, long[] wordsBuffer) Efficiently generate a RoaringBitmap from an uncompressed byte array or ByteBuffer This method tries to minimise all kinds of memory allocation
You can provide a cached wordsBuffer for avoiding 8 KB of extra allocation on every call No reference is kept to the wordsBuffer, so it can be cached as a ThreadLocalstatic MutableRoaringBitmapGenerate a MutableRoaringBitmap out of a BitSetstatic booleanequals(BitSet bitset, ImmutableRoaringBitmap bitmap) Compares a RoaringBitmap and a BitSet.
-
构造器详细资料
-
BufferBitSetUtil
public BufferBitSetUtil()
-
-
方法详细资料
-
bitmapOf
Generate a MutableRoaringBitmap out of a BitSet- 参数:
bitSet- original bitset (will not be modified)- 返回:
- roaring bitmap equivalent to BitSet
-
bitmapOf
Generate a MutableRoaringBitmap out of a long[], each long using little-endian representation of its bits- 参数:
words- array of longs (will not be modified)- 返回:
- roaring bitmap
- 另请参阅:
-
bitmapOf
Efficiently generate a RoaringBitmap from an uncompressed byte array or ByteBuffer This method tries to minimise all kinds of memory allocation- 参数:
bb- the uncompressed bitmap- 返回:
- roaring bitmap
-
bitmapOf
Efficiently generate a RoaringBitmap from an uncompressed byte array or ByteBuffer This method tries to minimise all kinds of memory allocation
You can provide a cached wordsBuffer for avoiding 8 KB of extra allocation on every call No reference is kept to the wordsBuffer, so it can be cached as a ThreadLocal- 参数:
bb- the uncompressed bitmapwordsBuffer- buffer of lengthBitSetUtil.BLOCK_LENGTH- 返回:
- roaring bitmap
-
equals
Compares a RoaringBitmap and a BitSet. They are equal if and only if they contain the same set of integers.- 参数:
bitset- first object to be comparedbitmap- second object to be compared- 返回:
- whether they are equal
-