public class ConstantMemoryContainerAppender<T extends BitmapDataProvider & AppendableStorage<Container>> extends java.lang.Object implements RoaringBitmapWriter<T>
//...
RoaringBitmapWriter<RoaringBitmap> writer =
RoaringBitmapWriter.writer().constantMemory().get();
for (int i :....) {
writer.add(i);
}
writer.flush(); // important
RoaringBitmapWriter.BufferWizard, RoaringBitmapWriter.FastRankRoaringBitmapWizard, RoaringBitmapWriter.RoaringBitmapWizard, RoaringBitmapWriter.RoaringWizard<T extends RoaringBitmap>, RoaringBitmapWriter.Wizard<C extends WordStorage<C>,T extends BitmapDataProvider & AppendableStorage<C>>| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(int value)
Adds the value to the underlying bitmap.
|
void |
add(long min,
long max)
Add a range to the bitmap
|
void |
addMany(int... values)
Adds many values to the bitmap.
|
void |
flush()
Ensures that any buffered additions are flushed to the underlying bitmap.
|
T |
getUnderlying()
Grab a reference to the underlying bitmap
|
void |
reset()
Resets the writer so it can be reused, must release the reference to the underlying bitmap
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbufferWriter, get, writerpublic T getUnderlying()
getUnderlying 在接口中 RoaringBitmapWriter<T extends BitmapDataProvider & AppendableStorage<Container>>public void add(int value)
add 在接口中 RoaringBitmapWriter<T extends BitmapDataProvider & AppendableStorage<Container>>value - the value to add.public void addMany(int... values)
RoaringBitmapWriteraddMany 在接口中 RoaringBitmapWriter<T extends BitmapDataProvider & AppendableStorage<Container>>values - the values to addpublic void add(long min,
long max)
RoaringBitmapWriteradd 在接口中 RoaringBitmapWriter<T extends BitmapDataProvider & AppendableStorage<Container>>min - the inclusive min valuemax - the exclusive max valuepublic void flush()
flush 在接口中 RoaringBitmapWriter<T extends BitmapDataProvider & AppendableStorage<Container>>public void reset()
RoaringBitmapWriterreset 在接口中 RoaringBitmapWriter<T extends BitmapDataProvider & AppendableStorage<Container>>