public class RegularExpression extends Pattern
Regex
parser specification. The original
value is saved so that clients can revert back to the original value, typically through
an associated editor.Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
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.
|
getOriginalValue, setOriginalValue
public RegularExpression(java.lang.String pattern, boolean caseSensitiveCompare, java.lang.Object originalValue)
pattern
- any regular expression supported
by Regex
.public RegularExpression(java.lang.String pattern, boolean caseSensitiveCompare)
pattern
- any regular expression supported
by Regex
.public RegularExpression(java.lang.String pattern, boolean caseSensitiveCompare, java.lang.Object originalValue, boolean filterPattern)
pattern
- any regular expression supported
by Regex
.public RegularExpression(java.lang.Object originalValue, boolean caseSensitiveCompare, boolean filterValue)
toString
of the
supplied value. The pattern is filtered to insert escape sequences around any
RegularExpression
meta characters that would make the comparison invalid.public static java.lang.String toString(java.lang.Object obj)
toString
on the original object.obj
- an object to get a default pattern for.public java.lang.String getPattern()
public void setPattern(java.lang.String pattern)
public boolean isCaseSensitiveComparison()
public void setCaseSensitiveComparison(boolean caseSensitive)
public java.lang.String toString()
String
that describes the RegularExpression
.toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
Object.equals
with a class-specific comparison.equals
in class java.lang.Object
other
- the right side of the comparisonpublic int hashCode()
Object.hashCode
with class-specific code.hashCode
in class java.lang.Object