Class LongSet


  • public class LongSet
    extends Object
    Collects long values in a hash set (closed hashing on power-of-two sized long[])
    NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
    • Constructor Detail

      • LongSet

        public LongSet​(int sz)
    • Method Detail

      • getBackingArray

        public long[] getBackingArray()
        Returns the long[] array that has entries filled in with values or "0" for empty. To see if "0" itself is in the set, call containsZero()
      • containsZero

        public boolean containsZero()
      • add

        public boolean add​(long val)
        Adds an additional value to the set, returns true if the set did not already contain the value.
      • cardinality

        public int cardinality()
        The number of values in the set
      • iterator

        public LongIterator iterator()
        Returns an iterator over the values in the set.