Package org.apache.lucene.util.packed
Class PackedInts.MutableImpl
- java.lang.Object
-
- org.apache.lucene.util.packed.PackedInts.Reader
-
- org.apache.lucene.util.packed.PackedInts.Mutable
-
- org.apache.lucene.util.packed.PackedInts.MutableImpl
-
- All Implemented Interfaces:
Accountable
- Direct Known Subclasses:
Packed64
,Packed64SingleBlock
- Enclosing class:
- PackedInts
abstract static class PackedInts.MutableImpl extends PackedInts.Mutable
-
-
Field Summary
Fields Modifier and Type Field Description protected int
bitsPerValue
protected int
valueCount
-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MutableImpl(int valueCount, int bitsPerValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBitsPerValue()
int
size()
java.lang.String
toString()
-
Methods inherited from class org.apache.lucene.util.packed.PackedInts.Mutable
clear, fill, set, set
-
Methods inherited from class org.apache.lucene.util.packed.PackedInts.Reader
get, get
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources, ramBytesUsed
-
-
-
-
Method Detail
-
getBitsPerValue
public final int getBitsPerValue()
- Specified by:
getBitsPerValue
in classPackedInts.Mutable
- 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 final int size()
- Specified by:
size
in classPackedInts.Reader
- Returns:
- the number of values.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-