Package org.apache.lucene.sandbox.search
Class LongHashSet
- All Implemented Interfaces:
Iterable<Long>
,Collection<Long>
,Set<Long>
,Accountable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
(package private) final int
(package private) final boolean
(package private) final int
private 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
Methods inherited from class java.util.AbstractSet
removeAll
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, containsAll, isEmpty, remove, retainAll, toArray, toArray, 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
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
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 -
hashCode
final int hashCode
-
-
Constructor Details
-
LongHashSet
LongHashSet(long... values)
-
-
Method Details
-
add
private boolean add(long l) -
contains
boolean contains(long l) -
size
public int size()- Specified by:
size
in interfaceCollection<Long>
- Specified by:
size
in interfaceSet<Long>
- Specified by:
size
in classAbstractCollection<Long>
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection<Long>
- Specified by:
hashCode
in interfaceSet<Long>
- Overrides:
hashCode
in classAbstractSet<Long>
-
equals
- Specified by:
equals
in interfaceCollection<Long>
- Specified by:
equals
in interfaceSet<Long>
- Overrides:
equals
in classAbstractSet<Long>
-
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
-
contains
- Specified by:
contains
in interfaceCollection<Long>
- Specified by:
contains
in interfaceSet<Long>
- Overrides:
contains
in classAbstractCollection<Long>
-
iterator
-