public final class ImmutableRoaringArray extends Object implements PointableRoaringArray
| Modifier and Type | Field and Description |
|---|---|
protected static short |
SERIAL_COOKIE |
protected static short |
SERIAL_COOKIE_NO_RUNCONTAINER |
| Modifier | Constructor and Description |
|---|---|
protected |
ImmutableRoaringArray(ByteBuffer bbf)
Create an array based on a previously serialized ByteBuffer.
|
| Modifier and Type | Method and Description |
|---|---|
int |
advanceUntil(short x,
int pos)
Find the smallest integer index larger than pos such that getKeyAtIndex(index)>=x.
|
ImmutableRoaringArray |
clone()
Create an independent copy of the underlying array
|
int |
getCardinality(int k)
Returns the cardinality of the container at the given index.
|
MappeableContainer |
getContainer(short x) |
MappeableContainer |
getContainerAtIndex(int i) |
org.roaringbitmap.buffer.MappeableContainerPointer |
getContainerPointer() |
org.roaringbitmap.buffer.MappeableContainerPointer |
getContainerPointer(int startIndex) |
int |
getIndex(short x) |
short |
getKeyAtIndex(int i) |
int |
hashCode() |
boolean |
hasRunCompression()
Check whether this bitmap has had its runs compressed.
|
protected int |
headerSize(boolean hasrun) |
boolean |
isEmpty()
Returns true if this bitmap is empty.
|
void |
serialize(DataOutput out)
Serialize.
|
int |
serializedSizeInBytes() |
int |
size() |
protected static final short SERIAL_COOKIE
protected static final short SERIAL_COOKIE_NO_RUNCONTAINER
protected ImmutableRoaringArray(ByteBuffer bbf)
bbf - The source ByteBufferpublic boolean hasRunCompression()
PointableRoaringArrayhasRunCompression in interface PointableRoaringArrayprotected int headerSize(boolean hasrun)
public ImmutableRoaringArray clone()
PointableRoaringArrayclone in interface PointableRoaringArrayclone in class Objectpublic int getCardinality(int k)
PointableRoaringArraygetCardinality in interface PointableRoaringArrayk - indexpublic MappeableContainer getContainer(short x)
getContainer in interface PointableRoaringArrayx - 16-bit keypublic MappeableContainer getContainerAtIndex(int i)
getContainerAtIndex in interface PointableRoaringArrayi - indexpublic org.roaringbitmap.buffer.MappeableContainerPointer getContainerPointer()
getContainerPointer in interface PointableRoaringArraypublic boolean isEmpty()
public org.roaringbitmap.buffer.MappeableContainerPointer getContainerPointer(int startIndex)
getContainerPointer in interface PointableRoaringArraystartIndex - starting indexpublic int getIndex(short x)
getIndex in interface PointableRoaringArrayx - 16-bit keypublic short getKeyAtIndex(int i)
getKeyAtIndex in interface PointableRoaringArrayi - the indexpublic int advanceUntil(short x,
int pos)
PointableRoaringArrayadvanceUntil in interface PointableRoaringArrayx - minimal valuepos - index to exceedpublic void serialize(DataOutput out) throws IOException
serialize in interface PointableRoaringArrayout - the DataOutput streamIOException - Signals that an I/O exception has occurred.public int serializedSizeInBytes()
serializedSizeInBytes in interface PointableRoaringArraypublic int size()
size in interface PointableRoaringArrayCopyright © 2015. All Rights Reserved.