- java.lang.Object
-
- org.apache.lucene.document.LongHashSet
-
- All Implemented Interfaces:
Accountable
final class LongHashSet extends java.lang.Object implements Accountable
Set of longs, optimized for docvalues usage
-
-
Field Summary
Fields Modifier and Type Field Description private static long
BASE_RAM_BYTES
(package private) boolean
hasMissingValue
(package private) int
mask
(package private) long
maxValue
maximum value in the set, or Long.MIN_VALUE for an empty set(package private) long
minValue
minimum value in the set, or Long.MAX_VALUE for an empty setprivate static long
MISSING
(package private) int
size
(package private) long[]
table
-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description LongHashSet(long[] values)
Construct a set.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
add(long l)
(package private) boolean
contains(long l)
check for membership in the set.boolean
equals(java.lang.Object obj)
int
hashCode()
long
ramBytesUsed()
Return the memory usage of this object in bytes.(package private) int
size()
number of elements in the set(package private) java.util.stream.LongStream
stream()
returns a stream of all values contained in this setjava.lang.String
toString()
-
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 Detail
-
BASE_RAM_BYTES
private static final long BASE_RAM_BYTES
-
MISSING
private static final long MISSING
- See Also:
- Constant Field Values
-
table
final long[] table
-
mask
final int mask
-
hasMissingValue
final boolean hasMissingValue
-
size
final int size
-
minValue
final long minValue
minimum value in the set, or Long.MAX_VALUE for an empty set
-
maxValue
final long maxValue
maximum value in the set, or Long.MIN_VALUE for an empty set
-
-
Method Detail
-
add
private boolean add(long l)
-
contains
boolean contains(long l)
-
stream
java.util.stream.LongStream stream()
returns a stream of all values contained in this set
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
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
-
-