public static final class PackedInts.NullReader extends Object implements PackedInts.Reader
PackedInts.Reader
which has all its values equal to 0 (bitsPerValue = 0).Constructor and Description |
---|
PackedInts.NullReader(int valueCount)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
long |
get(int index) |
int |
get(int index,
long[] arr,
int off,
int len)
Bulk get: read at least one and at most
len longs starting
from index into arr[off:off+len] and return
the actual number of values that have been read. |
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() |
boolean |
hasArray()
Returns true if this implementation is backed by a
native java array.
|
long |
ramBytesUsed()
Return the in-memory size in bytes.
|
int |
size() |
public PackedInts.NullReader(int valueCount)
public long get(int index)
get
in interface PackedInts.Reader
index
- the position of the wanted value.public int get(int index, long[] arr, int off, int len)
PackedInts.Reader
len
longs starting
from index
into arr[off:off+len]
and return
the actual number of values that have been read.get
in interface PackedInts.Reader
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 ramBytesUsed()
PackedInts.Reader
ramBytesUsed
in interface PackedInts.Reader
public Object getArray()
PackedInts.Reader
getArray
in interface PackedInts.Reader
public boolean hasArray()
PackedInts.Reader
hasArray
in interface PackedInts.Reader
PackedInts.Reader.getArray()
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.