Class CharClassInterval

java.lang.Object
jflex.core.unicode.CharClassInterval

public class CharClassInterval extends Object
Stores an interval of characters together with the character class

A character belongs to an interval, if its Unicode value is greater than or equal to the Unicode value of start and smaller than or equal to the Unicode value of end .

All characters of the interval must belong to the same character class.

Version:
JFlex 1.8.2
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final int
    The code of the class all characters of this interval belong to.
    final int
    The last character of the interval
    final int
    The first character of the interval
  • Constructor Summary

    Constructors
    Constructor
    Description
    CharClassInterval(int start, int end, int charClass)
    Creates a new CharClassInterval from start</code> to <CODE>end that belongs to character class charClass.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(int codePoint)
    Determines wether the specified code point is in this interval.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • start

      public final int start
      The first character of the interval
    • end

      public final int end
      The last character of the interval
    • charClass

      public final int charClass
      The code of the class all characters of this interval belong to.
  • Constructor Details

    • CharClassInterval

      public CharClassInterval(int start, int end, int charClass)
      Creates a new CharClassInterval from start</code> to <CODE>end that belongs to character class charClass.
      Parameters:
      start - The first character of the interval
      end - The last character of the interval
      charClass - The code of the class all characters of this interval belong to.
  • Method Details

    • contains

      public boolean contains(int codePoint)
      Determines wether the specified code point is in this interval.
    • toString

      public String toString()
      Overrides:
      toString in class Object