Class Literal

  • All Implemented Interfaces:
    Serializable

    public final class Literal
    extends Component
    This regular expression component matches one character. This pattern element has an associated minimum and maximum range. The component must match at least the minimum count and up to the maximum count (inclusive).
    Author:
    Charles Rapp
    See Also:
    Serialized Form
    • Method Detail

      • lessThan

        public boolean lessThan​(char c)
        Returns true if this component is less than the character c; returns false otherwise.
        Specified by:
        lessThan in class Component
        Parameters:
        c - Test against this character.
        Returns:
        true if this component is less than the character c; returns false otherwise.
      • equalTo

        public boolean equalTo​(char c)
        Returns true if this component is equal to the character c; returns false otherwise.
        Specified by:
        equalTo in class Component
        Parameters:
        c - Test against this character.
        Returns:
        true if this component is equal to the character c; returns false otherwise.
      • greaterThan

        public boolean greaterThan​(char c)
        Returns true if this component is greater than the character c; returns false otherwise.
        Specified by:
        greaterThan in class Component
        Parameters:
        c - Test against this character.
        Returns:
        true if this component is greater than the character c; returns false otherwise.
      • literal

        public int literal()
        Returns the literal character.
        Returns:
        the literal character.
      • toString

        public String toString()
        Returns a textual representation of a literal.
        Overrides:
        toString in class Object
        Returns:
        a textual representation of a literal.