Class DocValuesLongHashSet

java.lang.Object
org.apache.lucene.document.DocValuesLongHashSet
All Implemented Interfaces:
Accountable

final class DocValuesLongHashSet extends Object implements Accountable
Set of longs, optimized for docvalues usage
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private 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 set
    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
    Constructor
    Description
    DocValuesLongHashSet(long[] values)
    Construct a set.
  • Method Summary

    Modifier and Type
    Method
    Description
    private boolean
    add(long l)
     
    (package private) boolean
    contains(long l)
    check for membership in the set.
    boolean
     
    int
     
    long
    Return the memory usage of this object in bytes.
    (package private) int
    number of elements in the set
    (package private) LongStream
    returns a stream of all values contained in this set
     

    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 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
  • 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)
      check for membership in the set.

      You should use minValue and maxValue to guide/terminate iteration before calling this.

    • stream

      LongStream stream()
      returns a stream of all values contained in this set
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class 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 interface Accountable