Package 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
APackedInts.Readerwhich has all its values equal to 0 (bitsPerValue = 0). 
- 
- 
Field Summary
- 
Fields inherited from class org.apache.lucene.index.NumericDocValues
EMPTY 
 - 
 
- 
Constructor Summary
Constructors Constructor Description NullReader(int valueCount)Sole constructor. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longget(int index)Returns the numeric value for the specified document ID.intget(int index, long[] arr, int off, int len)Bulk get: read at least one and at mostlenlongs starting fromindexintoarr[off:off+len]and return the actual number of values that have been read.intgetBitsPerValue()longramBytesUsed()Return the in-memory size in bytes.intsize()- 
Methods inherited from class org.apache.lucene.util.packed.PackedInts.Reader
getArray, hasArray 
 - 
 
 - 
 
- 
- 
Method Detail
- 
get
public long get(int index)
Description copied from class:NumericDocValuesReturns the numeric value for the specified document ID.- Specified by:
 getin classNumericDocValues- 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.ReaderBulk get: read at least one and at mostlenlongs starting fromindexintoarr[off:off+len]and return the actual number of values that have been read.- Overrides:
 getin classPackedInts.Reader
 
- 
getBitsPerValue
public int getBitsPerValue()
- Specified by:
 getBitsPerValuein classPackedInts.Reader- Returns:
 - the number of bits used to store any given value.
         Note: This does not imply that memory usage is
         
bitsPerValue * #valuesas implementations are free to use non-space-optimal packing of bits. 
 
- 
size
public int size()
- Specified by:
 sizein classPackedInts.Reader- Returns:
 - the number of values.
 
 
- 
ramBytesUsed
public long ramBytesUsed()
Description copied from class:PackedInts.ReaderReturn the in-memory size in bytes.- Specified by:
 ramBytesUsedin classPackedInts.Reader
 
 - 
 
 -