IBM Rational Functional Tester
Version 8.1.1000
IBM Rational Functional Tester API Reference

Project Version 2.3

com.rational.test.ft.value
Class RegularExpression

java.lang.Object   extended by com.rational.test.ft.value.Pattern
      extended by com.rational.test.ft.value.RegularExpression

public class RegularExpression
extends Pattern

Encapsulates the regular-expression pattern specification and the original value that the pattern replaces. This pattern is used in comparisons that use the regular-expression pattern matching defined in the Regex parser specification. The original value is saved so that clients can revert back to the original value, typically through an associated editor.

Since:
RFT1.0

Constructor Summary
RegularExpression(java.lang.Object originalValue, boolean caseSensitiveCompare, boolean filterValue)
          Constructs the pattern from the toString of the supplied value.
RegularExpression(java.lang.String pattern, boolean caseSensitiveCompare)
           
RegularExpression(java.lang.String pattern, boolean caseSensitiveCompare, java.lang.Object originalValue)
           
RegularExpression(java.lang.String pattern, boolean caseSensitiveCompare, java.lang.Object originalValue, boolean filterPattern)
           
 
Method Summary
 boolean equals(java.lang.Object other)
          Overrides Object.equals with a class-specific comparison.
 java.lang.String getPattern()
          Returns the regular-expression pattern.
 int hashCode()
          Overrides Object.hashCode with class-specific code.
 boolean isCaseSensitiveComparison()
          Returns whether the regular-expression pattern should be compared case sensitively.
 void setCaseSensitiveComparison(boolean caseSensitive)
          Updates whether the regular-expression pattern should be compared case sensitively.
 void setPattern(java.lang.String pattern)
          Updates the regular-expression pattern.
 java.lang.String toString()
          Returns a String that describes the RegularExpression.
static java.lang.String toString(java.lang.Object obj)
          Returns the the image used to create the default pattern for the specified object.
 
Methods inherited from class com.rational.test.ft.value.Pattern
getOriginalValue, setOriginalValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RegularExpression

public RegularExpression(java.lang.String pattern,                          boolean caseSensitiveCompare,                          java.lang.Object originalValue)
Parameters:
pattern - any regular expression supported by Regex.
Since:
RFT1.1

RegularExpression

public RegularExpression(java.lang.String pattern,                          boolean caseSensitiveCompare)
Parameters:
pattern - any regular expression supported by Regex.
Since:
RFT1.0

RegularExpression

public RegularExpression(java.lang.String pattern,                          boolean caseSensitiveCompare,                          java.lang.Object originalValue,                          boolean filterPattern)
Parameters:
pattern - any regular expression supported by Regex.
Since:
RFT1.0

RegularExpression

public RegularExpression(java.lang.Object originalValue,                          boolean caseSensitiveCompare,                          boolean filterValue)
Constructs the pattern from the toString of the supplied value. The pattern is filtered to insert escape sequences around any RegularExpression meta characters that would make the comparison invalid.

Since:
RFT1.0
Method Detail

toString

public static java.lang.String toString(java.lang.Object obj)
Returns the the image used to create the default pattern for the specified object. For array values this actually splits each value of the array into separate values and gets the image of each value. For non-array objects the result is typically the same as toString on the original object.

Parameters:
obj - an object to get a default pattern for.
Returns:
The default pattern for the specified object.
Since:
RFT1.0

getPattern

public java.lang.String getPattern()
Returns the regular-expression pattern.

Since:
RFT1.0

setPattern

public void setPattern(java.lang.String pattern)
Updates the regular-expression pattern.

Since:
RFT1.0

isCaseSensitiveComparison

public boolean isCaseSensitiveComparison()
Returns whether the regular-expression pattern should be compared case sensitively.

Since:
RFT1.1

setCaseSensitiveComparison

public void setCaseSensitiveComparison(boolean caseSensitive)
Updates whether the regular-expression pattern should be compared case sensitively.

Since:
RFT1.1

toString

public java.lang.String toString()
Returns a String that describes the RegularExpression.

Overrides:
toString in class java.lang.Object
Since:
RFT1.0

equals

public boolean equals(java.lang.Object other)
Overrides Object.equals with a class-specific comparison.

Overrides:
equals in class java.lang.Object
Parameters:
other - the right side of the comparison
Since:
RFT1.0

hashCode

public int hashCode()
Overrides Object.hashCode with class-specific code.

Overrides:
hashCode in class java.lang.Object
Since:
RFT1.0