Package org.netbeans.jemmy.util
Class RegExComparator
java.lang.Object
org.netbeans.jemmy.util.RegExComparator
- All Implemented Interfaces:
Operator.StringComparator
Be executed under 1.4 uses
java.util.regex.Pattern
functionality.
Otherwise understands only "." and "*" simbols, i.e. regexprs like ".*Ques.ion.*".-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Thrown in case of parsing error. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RegExComparator
public RegExComparator()
-
-
Method Details
-
equals
Description copied from interface:Operator.StringComparator
Imlementation must return true if strings are equal.- Specified by:
equals
in interfaceOperator.StringComparator
- Parameters:
caption
- a text to compare with pattern.match
- a pattern- Returns:
- true if text and pattern matches.
-
parse
Checks that caption matshes the pattern. Understands only "." (any symbol) and "*" (repeat symbol). Used for 1.3 and earclier javas, starting from 1.4java.util.regex.Pattern
class is used.- Parameters:
caption
- a caption to compare with the pattern.match
- a pattern- Returns:
- true if the caption matches the pattern.
-