public final class MutableRoaringArray extends Object implements Cloneable, Externalizable, PointableRoaringArray
| Modifier and Type | Class and Description |
|---|---|
protected static class |
MutableRoaringArray.Element |
| Modifier and Type | Field and Description |
|---|---|
protected static int |
INITIAL_CAPACITY |
protected static short |
SERIAL_COOKIE |
| Modifier | Constructor and Description |
|---|---|
protected |
MutableRoaringArray() |
protected |
MutableRoaringArray(ByteBuffer bb)
Create a roaring array based on a previously serialized ByteBuffer.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
append(short key,
MappeableContainer value) |
protected void |
appendCopiesAfter(PointableRoaringArray highLowContainer,
short beforeStart)
Append copies of the values AFTER a specified key (may or may not be
present) to end.
|
protected void |
appendCopiesUntil(PointableRoaringArray highLowContainer,
short stoppingKey)
Append copies of the values from another array, from the start
|
protected void |
appendCopy(PointableRoaringArray highLowContainer,
int startingIndex,
int end)
Append copies of the values from another array
|
protected void |
appendCopy(short key,
MappeableContainer value) |
protected void |
clear() |
MutableRoaringArray |
clone()
Create an independent copy of the underlying array
|
void |
deserialize(DataInput in)
Deserialize.
|
boolean |
equals(Object o) |
protected void |
extendArray(int k) |
int |
getCardinality(int i)
Returns the cardinality of the container at the given index.
|
MappeableContainer |
getContainer(short x) |
MappeableContainer |
getContainerAtIndex(int i) |
org.roaringbitmap.buffer.MappeableContainerPointer |
getContainerPointer() |
int |
getIndex(short x) |
short |
getKeyAtIndex(int i) |
int |
hashCode() |
protected void |
insertNewKeyValueAt(int i,
short key,
MappeableContainer value) |
void |
readExternal(ObjectInput in) |
protected void |
removeAtIndex(int i) |
protected void |
resize(int newLength) |
void |
serialize(DataOutput out)
Serialize.
|
int |
serializedSizeInBytes()
Report the number of bytes required for serialization.
|
protected void |
setContainerAtIndex(int i,
MappeableContainer c) |
int |
size() |
void |
writeExternal(ObjectOutput out) |
protected static final int INITIAL_CAPACITY
protected static final short SERIAL_COOKIE
protected MutableRoaringArray()
protected MutableRoaringArray(ByteBuffer bb)
bb - The source ByteBufferprotected void append(short key,
MappeableContainer value)
protected void appendCopiesAfter(PointableRoaringArray highLowContainer, short beforeStart)
highLowContainer - the other arraybeforeStart - given key is the largest key that we won't copyprotected void appendCopiesUntil(PointableRoaringArray highLowContainer, short stoppingKey)
highLowContainer - the other arraystoppingKey - any equal or larger key in other array will terminate copyingprotected void appendCopy(PointableRoaringArray highLowContainer, int startingIndex, int end)
highLowContainer - other arraystartingIndex - starting index in the other arrayend - last index array in the other arrayprotected void appendCopy(short key,
MappeableContainer value)
protected void clear()
public MutableRoaringArray clone()
PointableRoaringArrayclone in interface PointableRoaringArrayclone in class Objectpublic void deserialize(DataInput in) throws IOException
in - the DataInput streamIOException - Signals that an I/O exception has occurred.protected void extendArray(int k)
public 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 int getIndex(short x)
getIndex in interface PointableRoaringArrayx - 16-bit keypublic short getKeyAtIndex(int i)
getKeyAtIndex in interface PointableRoaringArrayi - the indexprotected void insertNewKeyValueAt(int i,
short key,
MappeableContainer value)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionprotected void removeAtIndex(int i)
protected void resize(int newLength)
public 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 PointableRoaringArrayprotected void setContainerAtIndex(int i,
MappeableContainer c)
public int size()
size in interface PointableRoaringArraypublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic int getCardinality(int i)
PointableRoaringArraygetCardinality in interface PointableRoaringArrayi - indexCopyright © 2014. All Rights Reserved.