|
 |
|
|
org.eclipse.emf.query.conditions.strings
Class StringValue
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
-
Direct Known Subclasses:
-
StringRegularExpressionValue,
SubStringValue
-
public class StringValue
- extends
StringCondition
A String related condition class that compares a String value to another.
The arguments being evaluated are adapted to a String first using a StringAdapter
and then the string will be compared with the initialization string
to see if they are equal.
Constructor Summary
|
StringValue
(
String string)
A simple constructor that takes an initialization
String to match against. |
StringValue
(
String string,
boolean caseSensitive)
A simple constructor that takes an initialization
String to match against. |
StringValue
(
String string,
boolean caseSensitive,
IDataTypeAdapter<
String> adapter)
A simple constructor that takes an initialization
String to match against,
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. |
StringValue
(
String string,
boolean caseSensitive,
StringAdapter adapter)
A simple constructor that takes an initialization
String to match against,
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. |
Method Summary
|
protected
String
|
getString
()
A getter function for the
String used by this StringValue condition for comparison
with other argument string |
protected boolean
|
isCaseSensitive
()
A getter function for the case-sensitive value used by this
StringValue condition |
boolean
|
isSatisfied
(
String str)
Tests whether the argument string equals to the initialization
String. |
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
StringValue
public StringValue(
String string)
- A simple constructor that takes an initialization
String to match against.
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:
-
string - the initialization String to use for equality testing
StringValue
public StringValue(
String string,
boolean caseSensitive)
- A simple constructor that takes an initialization
String to match against.
It defaults to using the StringAdapter.DEFAULT for adapting the evaluated
object to string before matching them.
-
Parameters:
-
string - the initialization String to use for equality testing
caseSensitive - a boolean value specifying whether to use case in matching strings
StringValue
public StringValue(
String string,
boolean caseSensitive,
StringAdapter adapter)
- A simple constructor that takes an initialization
String to match against,
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:
-
string - the initialization String to use for equality testing
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
StringValue
public StringValue(
String string,
boolean caseSensitive,
IDataTypeAdapter<
String> adapter)
- A simple constructor that takes an initialization
String to match against,
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:
-
string - the initialization String to use for equality testing
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
isSatisfied
public boolean isSatisfied(
String str)
- Tests whether the argument string equals to the initialization
String.
-
Specified by:
-
isSatisfied
in class
StringCondition
-
-
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)
isCaseSensitive
protected final boolean isCaseSensitive()
- A getter function for the case-sensitive value used by this
StringValue condition
-
-
Returns:
- boolean indicating whether or not to compare string in
case-sensitive manner or not.
getString
protected final
String getString()
- A getter function for the
String used by this StringValue condition for comparison
with other argument string
-
Returns:
- The initialization
String that this StringValue condition uses for testing
|
|
|