Class TBitSet

java.lang.Object
com.oracle.truffle.regex.util.TBitSet
All Implemented Interfaces:
Iterable<Integer>

public class TBitSet extends Object implements Iterable<Integer>
Bit Set implementation, with a lot of code shamelessly ripped from BitSet.
  • Constructor Details

    • TBitSet

      public TBitSet(int nbits)
  • Method Details

    • valueOf

      public static TBitSet valueOf(int... values)
    • getEmptyInstance

      public static TBitSet getEmptyInstance()
    • getStaticInstance

      public static TBitSet getStaticInstance(int i)
      Static shared instances for deduplication of common immutable bit sets.
      Parameters:
      i - The integer value of the static bit set's content, i.e. 0 is the empty bit set, 1 has words {0x0..., 0x1}, 2 has {0x0..., 0x2}, and so on.
    • getNumberOfStaticInstances

      public static int getNumberOfStaticInstances()
    • getStaticCacheKey

      public int getStaticCacheKey()
    • copy

      public TBitSet copy()
    • toLongArray

      public long[] toLongArray()
    • getInternalArray

      public long[] getInternalArray()
    • isEmpty

      public boolean isEmpty()
    • isFull

      public boolean isFull()
    • numberOfSetBits

      public int numberOfSetBits()
    • get

      public boolean get(int b)
    • set

      public void set(int b)
    • setRange

      public void setRange(int lo, int hi)
    • clearRange

      public void clearRange(int lo, int hi)
    • clear

      public void clear()
    • clear

      public void clear(int index)
    • invert

      public void invert()
    • intersect

      public void intersect(TBitSet other)
    • subtract

      public void subtract(TBitSet other)
    • union

      public void union(TBitSet other)
    • union

      public void union(Abstract128BitSet bs)
    • isDisjoint

      public boolean isDisjoint(TBitSet other)
    • contains

      public boolean contains(TBitSet other)
    • equals

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

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

      public PrimitiveIterator.OfInt iterator()
      Specified by:
      iterator in interface Iterable<Integer>
    • spliterator

      public Spliterator.OfInt spliterator()
      Specified by:
      spliterator in interface Iterable<Integer>
    • stream

      public IntStream stream()
    • toString

      public String toString()
      Overrides:
      toString in class Object