Class NaruLongHashSet

java.lang.Object
net.thevpc.naru.api.util.NaruLongHashSet

public class NaruLongHashSet extends Object
Hash set of primitive longs using open addressing with linear probing. O(1) average insert/lookup, no ordering guarantee. Optimized for small sets with frequent membership tests. Not thread-safe — synchronize externally.
  • Constructor Details

    • NaruLongHashSet

      public NaruLongHashSet()
    • NaruLongHashSet

      public NaruLongHashSet(int initialCapacity)
  • Method Details

    • add

      public boolean add(long value)
    • contains

      public boolean contains(long value)
    • size

      public int size()
    • isEmpty

      public boolean isEmpty()
    • toArray

      public long[] toArray()
    • toString

      public String toString()
      Overrides:
      toString in class Object