## org.eclipse.emf.query.conditions.strings
Class StringRegularExpressionValue

    java.lang.Object
      org.eclipse.emf.query.conditions.Condition
          org.eclipse.emf.query.conditions.DataTypeCondition<String>
              org.eclipse.emf.query.conditions.strings.StringCondition
                  org.eclipse.emf.query.conditions.strings.StringValue
                      org.eclipse.emf.query.conditions.strings.StringRegularExpressionValue

    public class StringRegularExpressionValue

extends StringValue

A `StringValue` condition subclass that tests for `String`using regular expression. The arguments being evaluated are adapted to a `String`first using a `StringAdapter` and then the string will be compared with the initialization regular expression to see if it matches.````

Field Summary

Fields inherited from class org.eclipse.emf.query.conditions.DataTypeCondition
`adapter, value`

Fields inherited from class org.eclipse.emf.query.conditions.Condition
`FALSE, TRUE`

Constructor Summary
`StringRegularExpressionValue(String patternStr)` A simple constructor that takes the regular expression to use for matching.
`StringRegularExpressionValue(String patternStr, boolean caseSensitive, IDataTypeAdapter<String> adapter)` A constructor that takes the regular expression to use for matching, a `StringAdapter` for adapting the evaluated object to string before matching them and a boolean flag indicating whether the pattern matching should be case-sensitive or not.
`StringRegularExpressionValue(String patternStr, boolean caseSensitive, StringAdapter adapter)` A constructor that takes the regular expression to use for matching, a `StringAdapter` for adapting the evaluated object to string before matching them and a boolean flag indicating whether the pattern matching should be case-sensitive or not.
`StringRegularExpressionValue(String patternStr, IDataTypeAdapter<String> adapter)` A constructor that takes the regular expression to use for matching, and a `StringAdapter` for adapting the evaluated object to string before matching them.
`StringRegularExpressionValue(String patternStr, StringAdapter adapter)` A constructor that takes the regular expression to use for matching, and a `StringAdapter` for adapting the evaluated object to string before matching them.

Method Summary
`protected Pattern` `getPattern()` A getter for the `Pattern` used by this `StringRegularExpressionValue`
`boolean` `isSatisfied(String str)` Answers whether the argument string matches the regular expression used in initialization of this `StringRegularExpressionValue`

Methods inherited from class org.eclipse.emf.query.conditions.strings.StringValue
`getString, isCaseSensitive`

Methods inherited from class org.eclipse.emf.query.conditions.strings.StringCondition
`isSatisfied`

Methods inherited from class org.eclipse.emf.query.conditions.Condition
`AND, EQUIVALENT, IMPLIES, OR, XOR`

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

Constructor Detail

### StringRegularExpressionValue

    public StringRegularExpressionValue(String patternStr)

  A simple constructor that takes the regular expression to use for matching. It defaults to using the StringAdapter.DEFAULT for adapting the evaluated object to string before matching them, and it defaults to being case-sensitive.

  Parameters:
    `patternStr` - The regular expression pattern to use for matching strings when evaluating this `StringRegularExpressionValue` condition

### StringRegularExpressionValue

    public StringRegularExpressionValue(String patternStr,
                                        StringAdapter adapter)

  A constructor that takes the regular expression to use for matching, and a `StringAdapter` for adapting the evaluated object to string before matching them. It defaults to being case-sensitive.

  Parameters:
    `patternStr` - The regular expression pattern to use for matching strings when evaluating this `StringRegularExpressionValue` condition.
    `adapter` - The `StringAdapter` to use to get a `String`out of evaluated Objects``

### StringRegularExpressionValue

    public StringRegularExpressionValue(String patternStr,
                                        IDataTypeAdapter<String> adapter)

  A constructor that takes the regular expression to use for matching, and a `StringAdapter` for adapting the evaluated object to string before matching them. It defaults to being case-sensitive.

  Parameters:
    `patternStr` - The regular expression pattern to use for matching strings when evaluating this `StringRegularExpressionValue` condition.
    `adapter` - A generic string adapter to use to get a `String`out of evaluated Objects``
  Since:
    1.2

### StringRegularExpressionValue

    public StringRegularExpressionValue(String patternStr,
                                        boolean caseSensitive,
                                        StringAdapter adapter)

  A constructor that takes the regular expression to use for matching, a `StringAdapter` for adapting the evaluated object to string before matching them and a boolean flag indicating whether the pattern matching should be case-sensitive or not.

  Parameters:
    `patternStr` - The regular expression pattern to use for matching strings when evaluating this `StringRegularExpressionValue` condition.
    `caseSensitive` - a boolean value specifying whether to use case in matching strings
    `adapter` - The `StringAdapter` to use to get a `String`out of evaluated Objects``

### StringRegularExpressionValue

    public StringRegularExpressionValue(String patternStr,
                                        boolean caseSensitive,
                                        IDataTypeAdapter<String> adapter)

  A constructor that takes the regular expression to use for matching, a `StringAdapter` for adapting the evaluated object to string before matching them and a boolean flag indicating whether the pattern matching should be case-sensitive or not.

  Parameters:
    `patternStr` - The regular expression pattern to use for matching strings when evaluating this `StringRegularExpressionValue` condition.
    `caseSensitive` - a boolean value specifying whether to use case in matching strings
    `adapter` - A generic string adapter to use to get a `String`out of evaluated Objects``
  Since:
    1.2

Method Detail

### isSatisfied

    public boolean isSatisfied(String str)

  Answers whether the argument string matches the regular expression used in initialization of this `StringRegularExpressionValue`

  Overrides:
    `isSatisfied` in class `StringValue`
  Parameters:
    `str` - The `String`to evaluate``
  Returns:
    boolean `true` if the argument string satisfies this `StringCondition`, `false` otherwise
  See Also:
    `StringCondition.isSatisfied(java.lang.String)`

### getPattern

    protected final Pattern getPattern()

  A getter for the `Pattern` used by this `StringRegularExpressionValue`

  Returns:
    Pattern The `Pattern` generated by compiling the regular expression

Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved.