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 long
maximum value in the set, or Long.MIN_VALUE for an empty set(package private) final long
minimum 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 boolean
add
(long l) (package private) boolean
contains
(long l) check for membership in the set.boolean
int
hashCode()
long
Return the memory usage of this object in bytes.(package private) int
size()
number of elements in the set(package private) LongStream
stream()
returns a stream of all values contained in this settoString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:Accountable
Return the memory usage of this object in bytes. Negative values are illegal.- Specified by:
ramBytesUsed
in interfaceAccountable
-