Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.netbeans.jemmy.util
Class RegExComparator

    java.lang.Object
      |
      +--org.netbeans.jemmy.util.RegExComparator

All Implemented Interfaces:
  Operator.StringComparator

public class RegExComparator
extends java.lang.Object
implements Operator.StringComparator

Be executed under 1.4 uses `java.util.regex.Pattern` functionality. Otherwise understands only "." and "*" simbols, i.e. regexprs like ".*Ques.ion.*".

Inner Class Summary
`static class` | `RegExComparator.RegExParsingException` Thrown in case of parsing error.

Constructor Summary
`RegExComparator()`

Method Summary
`boolean` | `equals(java.lang.String caption, java.lang.String match)` Imlementation must return true if strings are equal.
`boolean` | `parse(java.lang.String caption, java.lang.String match)` Checks that caption matshes the pattern.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RegExComparator

    public RegExComparator()

Method Detail

### equals

    public boolean equals(java.lang.String caption,
                          java.lang.String match)

  Description copied from interface: `Operator.StringComparator`
  Imlementation must return true if strings are equal.
  Specified by:
    `equals` in interface `Operator.StringComparator`
  Following copied from interface: `org.netbeans.jemmy.operators.Operator.StringComparator`
  Parameters:
    `caption` - a text to compare with pattern.
    `match` - a pattern
  Returns:
    true if text and pattern matches.

### parse

    public boolean parse(java.lang.String caption,
                         java.lang.String match)

  Checks that caption matshes the pattern. Understands only "." (any symbol) and "*" (repeat symbol). Used for 1.3 and earclier javas, starting from 1.4 `java.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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD