public class WrappedRoaringBitmap extends Object implements MutableBitmap
Constructor and Description |
---|
WrappedRoaringBitmap()
Creates a new WrappedRoaringBitmap wrapping an empty MutableRoaringBitmap
|
WrappedRoaringBitmap(boolean compressRunOnSerialization)
Creates a new WrappedRoaringBitmap wrapping an empty MutableRoaringBitmap
|
Modifier and Type | Method and Description |
---|---|
void |
add(int entry)
Add the specified integer to the bitmap.
|
void |
and(MutableBitmap mutableBitmap)
Compute the bitwise-and of this bitmap with another bitmap.
|
void |
andNot(MutableBitmap mutableBitmap)
Compute the bitwise-andNot of this bitmap with another bitmap.
|
void |
clear()
Empties the content of this bitmap.
|
int |
compareTo(ImmutableBitmap other) |
ImmutableBitmap |
difference(ImmutableBitmap otherBitmap)
Compute the bitwise-andNot of this bitmap with another bitmap.
|
boolean |
get(int value)
Returns true if the bit at position value is set
|
int |
getSizeInBytes()
Return the size in bytes for the purpose of serialization to a ByteBuffer.
|
ImmutableBitmap |
intersection(ImmutableBitmap otherBitmap)
Compute the bitwise-and of this bitmap with another bitmap.
|
boolean |
isEmpty() |
org.roaringbitmap.IntIterator |
iterator() |
void |
or(MutableBitmap mutableBitmap)
Compute the bitwise-or of this bitmap with another bitmap.
|
void |
remove(int entry)
Remove the specified integer to the bitmap.
|
void |
serialize(ByteBuffer buffer)
Write out a serialized (Immutable) version of the bitmap to the ByteBuffer.
|
int |
size() |
byte[] |
toBytes() |
String |
toString() |
ImmutableBitmap |
union(ImmutableBitmap otherBitmap)
Compute the bitwise-or of this bitmap with another bitmap.
|
void |
xor(MutableBitmap mutableBitmap)
Compute the bitwise-xor of this bitmap with another bitmap.
|
public WrappedRoaringBitmap()
public WrappedRoaringBitmap(boolean compressRunOnSerialization)
compressRunOnSerialization
- indicates whether to call RoaringBitmap.runOptimize()
before serializingpublic byte[] toBytes()
toBytes
in interface ImmutableBitmap
public int compareTo(ImmutableBitmap other)
compareTo
in interface ImmutableBitmap
public void clear()
MutableBitmap
clear
in interface MutableBitmap
public void or(MutableBitmap mutableBitmap)
MutableBitmap
or
in interface MutableBitmap
mutableBitmap
- other bitmappublic void and(MutableBitmap mutableBitmap)
MutableBitmap
and
in interface MutableBitmap
mutableBitmap
- other bitmappublic void andNot(MutableBitmap mutableBitmap)
MutableBitmap
andNot
in interface MutableBitmap
mutableBitmap
- other bitmappublic void xor(MutableBitmap mutableBitmap)
MutableBitmap
xor
in interface MutableBitmap
mutableBitmap
- other bitmappublic int getSizeInBytes()
MutableBitmap
getSizeInBytes
in interface MutableBitmap
public void add(int entry)
MutableBitmap
add
in interface MutableBitmap
entry
- integer to be addedpublic int size()
size
in interface ImmutableBitmap
public void serialize(ByteBuffer buffer)
MutableBitmap
serialize
in interface MutableBitmap
buffer
- where we writepublic void remove(int entry)
MutableBitmap
remove
in interface MutableBitmap
entry
- integer to be removepublic org.roaringbitmap.IntIterator iterator()
iterator
in interface ImmutableBitmap
public boolean isEmpty()
isEmpty
in interface ImmutableBitmap
public ImmutableBitmap union(ImmutableBitmap otherBitmap)
ImmutableBitmap
union
in interface ImmutableBitmap
otherBitmap
- other bitmappublic ImmutableBitmap intersection(ImmutableBitmap otherBitmap)
ImmutableBitmap
intersection
in interface ImmutableBitmap
otherBitmap
- other bitmappublic ImmutableBitmap difference(ImmutableBitmap otherBitmap)
ImmutableBitmap
difference
in interface ImmutableBitmap
otherBitmap
- other bitmappublic boolean get(int value)
ImmutableBitmap
get
in interface ImmutableBitmap
value
- the position to checkCopyright © 2011–2017. All rights reserved.