org.apache.lucene.util.packed
Class PackedInts.NullReader
java.lang.Object
org.apache.lucene.index.NumericDocValues
org.apache.lucene.util.packed.PackedInts.Reader
org.apache.lucene.util.packed.PackedInts.NullReader
- Enclosing class:
- PackedInts
public static final class PackedInts.NullReader
- extends PackedInts.Reader
A PackedInts.Reader
which has all its values equal to 0 (bitsPerValue = 0).
Method Summary |
long |
get(int index)
Returns the numeric value for the specified document ID. |
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. |
int |
getBitsPerValue()
|
long |
ramBytesUsed()
Return the in-memory size in bytes. |
int |
size()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PackedInts.NullReader
public PackedInts.NullReader(int valueCount)
- Sole constructor.
get
public long get(int index)
- Description copied from class:
NumericDocValues
- Returns the numeric value for the specified document ID.
- Specified by:
get
in class NumericDocValues
- Parameters:
index
- document ID to lookup
- Returns:
- numeric value
get
public int get(int index,
long[] arr,
int off,
int len)
- Description copied from class:
PackedInts.Reader
- 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.
- Overrides:
get
in class PackedInts.Reader
getBitsPerValue
public int getBitsPerValue()
- Specified by:
getBitsPerValue
in class PackedInts.Reader
- Returns:
- the number of bits used to store any given value.
Note: This does not imply that memory usage is
bitsPerValue * #values
as implementations are free to
use non-space-optimal packing of bits.
size
public int size()
- Specified by:
size
in class PackedInts.Reader
- Returns:
- the number of values.
ramBytesUsed
public long ramBytesUsed()
- Description copied from class:
PackedInts.Reader
- Return the in-memory size in bytes.
- Specified by:
ramBytesUsed
in class PackedInts.Reader
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.