Package org.roaringbitmap
Interface RoaringBitmapWriter<T extends BitmapDataProvider>
-
- All Superinterfaces:
java.util.function.Supplier<T>
- All Known Implementing Classes:
ConstantMemoryContainerAppender
,ContainerAppender
public interface RoaringBitmapWriter<T extends BitmapDataProvider> extends java.util.function.Supplier<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
RoaringBitmapWriter.BufferWizard
static class
RoaringBitmapWriter.FastRankRoaringBitmapWizard
static class
RoaringBitmapWriter.RoaringBitmapWizard
static class
RoaringBitmapWriter.RoaringWizard<T extends RoaringBitmap>
static class
RoaringBitmapWriter.Wizard<C extends WordStorage<C>,T extends BitmapDataProvider & AppendableStorage<C>>
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
add(int value)
buffers a value to be added to the bitmap.void
add(long min, long max)
Add a range to the bitmapvoid
addMany(int... values)
Adds many values to the bitmap.static RoaringBitmapWriter.Wizard<MappeableContainer,MutableRoaringBitmap>
bufferWriter()
void
flush()
Flushes all pending changes to the bitmap.default T
get()
flushes any pending changes to the bitmap and returns the bitmapT
getUnderlying()
Gets the bitmap being written to.void
reset()
Resets the writer so it can be reused, must release the reference to the underlying bitmapstatic RoaringBitmapWriter.Wizard<Container,RoaringBitmap>
writer()
-
-
-
Method Detail
-
writer
static RoaringBitmapWriter.Wizard<Container,RoaringBitmap> writer()
-
bufferWriter
static RoaringBitmapWriter.Wizard<MappeableContainer,MutableRoaringBitmap> bufferWriter()
-
getUnderlying
T getUnderlying()
Gets the bitmap being written to.- Returns:
- the bitmap
-
add
void add(int value)
buffers a value to be added to the bitmap.- Parameters:
value
- the value
-
add
void add(long min, long max)
Add a range to the bitmap- Parameters:
min
- the inclusive min valuemax
- the exclusive max value
-
addMany
void addMany(int... values)
Adds many values to the bitmap.- Parameters:
values
- the values to add
-
flush
void flush()
Flushes all pending changes to the bitmap.
-
get
default T get()
flushes any pending changes to the bitmap and returns the bitmap- Specified by:
get
in interfacejava.util.function.Supplier<T extends BitmapDataProvider>
- Returns:
- the underlying bitmap
-
reset
void reset()
Resets the writer so it can be reused, must release the reference to the underlying bitmap
-
-