Class CompressedCodePointSet

java.lang.Object
com.oracle.truffle.regex.charset.CompressedCodePointSet

public final class CompressedCodePointSet extends Object
Compressed variant of CodePointSet. Stores clusters of small ranges as bit sets, if possible. Every range in this set's sorted list of ranges may be associated to a bit set, which stores the more "fine-grained" ranges inside the larger range. Example:
 Character set:
 [0x02, 0x04, 0x06, 0x1000, 0x1020-0x1030]

 Resulting compressed code point set:
 - ranges:   [0x02-0x06,          0x1000, 0x1020-0x1030]
 - bit-sets: [[0x02, 0x04, 0x06], null,   null         ]
 
See Also:
  • Method Details

    • getRanges

      public int[] getRanges()
    • hasBitSets

      public boolean hasBitSets()
    • getBitSets

      public long[][] getBitSets()
    • getLo

      public int getLo(int i)
    • getHi

      public int getHi(int i)
    • size

      public int size()
    • hasBitSet

      public boolean hasBitSet(int i)
    • getBitSet

      public long[] getBitSet(int i)
    • create

      public static CompressedCodePointSet create(ImmutableSortedListOfIntRanges cps, CompilationBuffer compilationBuffer)
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object