Package org.apache.lucene.search
Class LongHashSet
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<java.lang.Long>
-
- org.apache.lucene.search.LongHashSet
-
- All Implemented Interfaces:
java.lang.Iterable<java.lang.Long>,java.util.Collection<java.lang.Long>,java.util.Set<java.lang.Long>,Accountable
final class LongHashSet extends java.util.AbstractSet<java.lang.Long> implements Accountable
-
-
Field Summary
Fields Modifier and Type Field Description private static longBASE_RAM_BYTES(package private) inthashCode(package private) booleanhasMissingValue(package private) intmaskprivate static longMISSING(package private) intsize(package private) long[]table-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description LongHashSet(long... values)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleanadd(long l)(package private) booleancontains(long l)booleancontains(java.lang.Object o)booleanequals(java.lang.Object obj)inthashCode()java.util.Iterator<java.lang.Long>iterator()longramBytesUsed()Return the memory usage of this object in bytes.intsize()-
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
-
-
-
-
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
-
hashCode
final int hashCode
-
-
Method Detail
-
add
private boolean add(long l)
-
contains
boolean contains(long l)
-
size
public int size()
- Specified by:
sizein interfacejava.util.Collection<java.lang.Long>- Specified by:
sizein interfacejava.util.Set<java.lang.Long>- Specified by:
sizein classjava.util.AbstractCollection<java.lang.Long>
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.util.Collection<java.lang.Long>- Specified by:
hashCodein interfacejava.util.Set<java.lang.Long>- Overrides:
hashCodein classjava.util.AbstractSet<java.lang.Long>
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfacejava.util.Collection<java.lang.Long>- Specified by:
equalsin interfacejava.util.Set<java.lang.Long>- Overrides:
equalsin classjava.util.AbstractSet<java.lang.Long>
-
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
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
containsin interfacejava.util.Collection<java.lang.Long>- Specified by:
containsin interfacejava.util.Set<java.lang.Long>- Overrides:
containsin classjava.util.AbstractCollection<java.lang.Long>
-
iterator
public java.util.Iterator<java.lang.Long> iterator()
- Specified by:
iteratorin interfacejava.util.Collection<java.lang.Long>- Specified by:
iteratorin interfacejava.lang.Iterable<java.lang.Long>- Specified by:
iteratorin interfacejava.util.Set<java.lang.Long>- Specified by:
iteratorin classjava.util.AbstractCollection<java.lang.Long>
-
-