public abstract static class PackedInts.ReaderImpl extends Object implements PackedInts.Reader
Modifier and Type | Field and Description |
---|---|
protected int |
bitsPerValue |
protected int |
valueCount |
Modifier | Constructor and Description |
---|---|
protected |
PackedInts.ReaderImpl(int valueCount,
int bitsPerValue) |
Modifier and Type | Method and Description |
---|---|
Object |
getArray()
Expert: if the bit-width of this reader matches one of
java's native types, returns the underlying array
(ie, byte[], short[], int[], long[]); else, returns
null.
|
int |
getBitsPerValue() |
long |
getMaxValue() |
boolean |
hasArray()
Returns true if this implementation is backed by a
native java array.
|
int |
size() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get
protected final int bitsPerValue
protected final int valueCount
protected PackedInts.ReaderImpl(int valueCount, int bitsPerValue)
public int getBitsPerValue()
getBitsPerValue
in interface PackedInts.Reader
bitsPerValue * #values
as implementations are free to
use non-space-optimal packing of bits.public int size()
size
in interface PackedInts.Reader
public long getMaxValue()
public Object getArray()
PackedInts.Reader
getArray
in interface PackedInts.Reader
public boolean hasArray()
PackedInts.Reader
hasArray
in interface PackedInts.Reader
PackedInts.Reader.getArray()