org.apache.lucene.util.packed
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.Readerindex - the position of the wanted value.public int get(int index,
long[] arr,
int off,
int len)
PackedInts.Readerlen longs starting
from index into arr[off:off+len] and return
the actual number of values that have been read.get in interface PackedInts.Readerpublic int getBitsPerValue()
getBitsPerValue in interface PackedInts.ReaderbitsPerValue * #values as implementations are free to
use non-space-optimal packing of bits.public int size()
size in interface PackedInts.Readerpublic long ramBytesUsed()
PackedInts.ReaderramBytesUsed in interface PackedInts.Readerpublic Object getArray()
PackedInts.ReadergetArray in interface PackedInts.Readerpublic boolean hasArray()
PackedInts.ReaderhasArray in interface PackedInts.ReaderPackedInts.Reader.getArray()Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.