Class AnyChar

  • All Implemented Interfaces:
    Serializable

    public final class AnyChar
    extends Component
    This regular expression component matches any 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. Any character is always less than the specified character if c is not the minimally allowed character value.
        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. Any character is always equal to the specified character.
        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. Any character is always greater than the specified character if c is not the maximally allowed character.
        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.
      • toString

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