Class CompareUtil.RegExpCompareUtil

  • All Implemented Interfaces:
    CompareUtil
    Enclosing interface:
    CompareUtil

    public static class CompareUtil.RegExpCompareUtil
    extends Object
    implements CompareUtil
    Compares with regular-expressions. string.matches(pattern)
    See Also:
    Pattern
    • Constructor Detail

      • RegExpCompareUtil

        public RegExpCompareUtil()
    • Method Detail

      • matches

        public boolean matches​(String pattern,
                               String str)
        Description copied from interface: CompareUtil
        Tells if the given pattern matches the string according to the implemented comparer/algorithm.
        Specified by:
        matches in interface CompareUtil
        Parameters:
        pattern - the pattern to use.
        str - the string to match on.
        Returns:
        true if the string matches the pattern.
      • getName

        public String getName()
        Description copied from interface: CompareUtil
        Returns the human-readable name of the util.
        Specified by:
        getName in interface CompareUtil
        Returns:
        the name.
      • getOperator

        public char getOperator()
        Description copied from interface: CompareUtil
        Returns the operator name of the util.
        Specified by:
        getOperator in interface CompareUtil
        Returns:
        the operator.