java.lang.Object
org.apache.lucene.document.DocValuesLongHashSet
- All Implemented Interfaces:
Accountable
Set of longs, optimized for docvalues usage
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long(package private) final boolean(package private) final int(package private) final longmaximum value in the set, or Long.MIN_VALUE for an empty set(package private) final longminimum value in the set, or Long.MAX_VALUE for an empty setprivate static final long(package private) final int(package private) final long[]Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanadd(long l) (package private) booleancontains(long l) check for membership in the set.booleaninthashCode()longReturn the memory usage of this object in bytes.(package private) intsize()number of elements in the set(package private) LongStreamstream()returns a stream of all values contained in this settoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Field Details
-
BASE_RAM_BYTES
private static final long BASE_RAM_BYTES -
MISSING
private static final long MISSING- See Also:
-
table
final long[] table -
mask
final int mask -
hasMissingValue
final boolean hasMissingValue -
size
final int size -
minValue
final long minValueminimum value in the set, or Long.MAX_VALUE for an empty set -
maxValue
final long maxValuemaximum value in the set, or Long.MIN_VALUE for an empty set
-
-
Constructor Details
-
DocValuesLongHashSet
DocValuesLongHashSet(long[] values) Construct a set. Values must be in sorted order.
-
-
Method Details
-
add
private boolean add(long l) -
contains
boolean contains(long l) -
stream
LongStream stream()returns a stream of all values contained in this set -
hashCode
public int hashCode() -
equals
-
toString
-
size
int size()number of elements in the set -
ramBytesUsed
public long ramBytesUsed()Description copied from interface:AccountableReturn the memory usage of this object in bytes. Negative values are illegal.- Specified by:
ramBytesUsedin interfaceAccountable
-