public final class ImmutableRoaringArray extends java.lang.Object implements PointableRoaringArray
| 限定符和类型 | 字段和说明 |
|---|---|
protected static short |
SERIAL_COOKIE |
protected static short |
SERIAL_COOKIE_NO_RUNCONTAINER |
| 限定符 | 构造器和说明 |
|---|---|
protected |
ImmutableRoaringArray(java.nio.ByteBuffer bbf)
Create an array based on a previously serialized ByteBuffer.
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
advanceUntil(char 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
|
boolean |
containsForContainerAtIndex(int i,
char x)
This checks whether the container at index i has the value x.
|
boolean |
equals(java.lang.Object o) |
int |
first()
Gets the first value in the array
|
int |
getCardinality(int k)
Returns the cardinality of the container at the given index.
|
MappeableContainer |
getContainerAtIndex(int i) |
int |
getContainerIndex(char x)
Returns either the index of the container corresponding to key x, or a negative value.
|
MappeableContainerPointer |
getContainerPointer() |
MappeableContainerPointer |
getContainerPointer(int startIndex) |
int |
getIndex(char x) |
char |
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.
|
int |
last()
Gets the last value in the array
|
void |
serialize(java.nio.ByteBuffer buffer)
Serialize.
|
void |
serialize(java.io.DataOutput out)
Serialize.
|
int |
serializedSizeInBytes() |
int |
size() |
protected static final short SERIAL_COOKIE
protected static final short SERIAL_COOKIE_NO_RUNCONTAINER
protected ImmutableRoaringArray(java.nio.ByteBuffer bbf)
bbf - The source ByteBufferpublic int advanceUntil(char x,
int pos)
PointableRoaringArrayadvanceUntil 在接口中 PointableRoaringArrayx - minimal valuepos - index to exceedpublic ImmutableRoaringArray clone()
PointableRoaringArrayclone 在接口中 PointableRoaringArrayclone 在类中 java.lang.Objectpublic int getCardinality(int k)
PointableRoaringArraygetCardinality 在接口中 PointableRoaringArrayk - indexpublic int getContainerIndex(char x)
PointableRoaringArraygetContainerIndex 在接口中 PointableRoaringArrayx - 16-bit keypublic MappeableContainer getContainerAtIndex(int i)
getContainerAtIndex 在接口中 PointableRoaringArrayi - indexpublic boolean containsForContainerAtIndex(int i,
char x)
PointableRoaringArraycontainsForContainerAtIndex 在接口中 PointableRoaringArrayi - container index (assumed to be non-negative)x - 16-bit value to checkpublic MappeableContainerPointer getContainerPointer()
getContainerPointer 在接口中 PointableRoaringArraypublic MappeableContainerPointer getContainerPointer(int startIndex)
getContainerPointer 在接口中 PointableRoaringArraystartIndex - starting indexpublic int getIndex(char x)
getIndex 在接口中 PointableRoaringArrayx - 16-bit keypublic char getKeyAtIndex(int i)
getKeyAtIndex 在接口中 PointableRoaringArrayi - the indexpublic boolean equals(java.lang.Object o)
equals 在类中 java.lang.Objectpublic int hashCode()
hashCode 在类中 java.lang.Objectpublic boolean hasRunCompression()
PointableRoaringArrayhasRunCompression 在接口中 PointableRoaringArrayprotected int headerSize(boolean hasrun)
public boolean isEmpty()
public void serialize(java.io.DataOutput out)
throws java.io.IOException
serialize 在接口中 PointableRoaringArrayout - the DataOutput streamjava.io.IOException - Signals that an I/O exception has occurred.public void serialize(java.nio.ByteBuffer buffer)
PointableRoaringArrayserialize 在接口中 PointableRoaringArraybuffer - the buffer to serialize topublic int serializedSizeInBytes()
serializedSizeInBytes 在接口中 PointableRoaringArraypublic int size()
size 在接口中 PointableRoaringArraypublic int first()
PointableRoaringArrayfirst 在接口中 PointableRoaringArraypublic int last()
PointableRoaringArraylast 在接口中 PointableRoaringArray