org.eclipse.emf.query.conditions.strings
Class SubStringValue
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.SubStringValue
public class SubStringValue
- extends StringValue
A StringValue
condition subclass that checks to see if the
initialization String
value is a sub-string to the one being evaluated.
The arguments being evaluated are adapted to a String first using a StringAdapter
and then the initialization string will be compared with the string being
evaluated to see if the initialization string is a sub-string of it.
Constructor Summary |
SubStringValue(String subString)
A simple constructor that takes an initialization String to
see if it is a sub-string of those being evaluated
It defaults to using the StringAdapter.DEFAULT for adapting the evaluated
object to string before checking them, and it defaults to being case-sensitive. |
SubStringValue(String subString,
boolean caseSensitive)
A constructor that takes an initialization String to
see if it is a sub-string of those being evaluated and a boolean
flag indicating whether the matching should be case-sensitive or not. |
SubStringValue(String subString,
boolean caseSensitive,
IDataTypeAdapter<String> adapter)
A constructor that takes an initialization String to
see if it is a sub-string of those being evaluated, a boolean
flag indicating whether the matching should be case-sensitive or not and
and a StringAdapter for adapting the evaluated object to string before checking them. |
SubStringValue(String subString,
boolean caseSensitive,
StringAdapter adapter)
A constructor that takes an initialization String to
see if it is a sub-string of those being evaluated, a boolean
flag indicating whether the matching should be case-sensitive or not and
and a StringAdapter for adapting the evaluated object to string before checking them. |
SubStringValue(String subString,
IDataTypeAdapter<String> adapter)
A constructor that takes an initialization String to
see if it is a sub-string of those being evaluated and a StringAdapter for
adapting the evaluated object to string before checking them. |
SubStringValue(String subString,
StringAdapter adapter)
A constructor that takes an initialization String to
see if it is a sub-string of those being evaluated and a StringAdapter for
adapting the evaluated object to string before checking them. |
Method Summary |
boolean |
isSatisfied(String str)
Checks to see if the initialization
String to is a sub-string of the
argument string being evaluated |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SubStringValue
public SubStringValue(String subString)
- A simple constructor that takes an initialization
String to
see if it is a sub-string of those being evaluated
It defaults to using the StringAdapter.DEFAULT for adapting the evaluated
object to string before checking them, and it defaults to being case-sensitive.
- Parameters:
subString
- The initialization String to see if it is a sub-string of those being evaluated
SubStringValue
public SubStringValue(String subString,
StringAdapter adapter)
- A constructor that takes an initialization
String to
see if it is a sub-string of those being evaluated and a StringAdapter
for
adapting the evaluated object to string before checking them.
It defaults to being case-sensitive.
- Parameters:
subString
- The initialization String to see if it is a sub-string of those being evaluatedadapter
- The StringAdapter
to use to get a String out of evaluated Objects
SubStringValue
public SubStringValue(String subString,
IDataTypeAdapter<String> adapter)
- A constructor that takes an initialization
String to
see if it is a sub-string of those being evaluated and a StringAdapter
for
adapting the evaluated object to string before checking them.
It defaults to being case-sensitive.
- Parameters:
subString
- The initialization String to see if it is a sub-string of those being evaluatedadapter
- a generic string adapter to use to get a String out of evaluated Objects- Since:
- 1.2
SubStringValue
public SubStringValue(String subString,
boolean caseSensitive)
- A constructor that takes an initialization
String to
see if it is a sub-string of those being evaluated and a boolean
flag indicating whether the matching should be case-sensitive or not.
It defaults to using the StringAdapter.DEFAULT for adapting the evaluated
object to string before checking them.
- Parameters:
subString
- The initialization String to see if it is a sub-string of those being evaluatedcaseSensitive
- A boolean value specifying whether to use case in matching strings
SubStringValue
public SubStringValue(String subString,
boolean caseSensitive,
StringAdapter adapter)
- A constructor that takes an initialization
String to
see if it is a sub-string of those being evaluated, a boolean
flag indicating whether the matching should be case-sensitive or not and
and a StringAdapter
for adapting the evaluated object to string before checking them.
- Parameters:
subString
- The initialization String to see if it is a sub-string of those being evaluatedcaseSensitive
- A boolean value specifying whether to use case in matching stringsadapter
- The StringAdapter
to use to get a String out of evaluated Objects
SubStringValue
public SubStringValue(String subString,
boolean caseSensitive,
IDataTypeAdapter<String> adapter)
- A constructor that takes an initialization
String to
see if it is a sub-string of those being evaluated, a boolean
flag indicating whether the matching should be case-sensitive or not and
and a StringAdapter
for adapting the evaluated object to string before checking them.
- Parameters:
subString
- The initialization String to see if it is a sub-string of those being evaluatedcaseSensitive
- A boolean value specifying whether to use case in matching stringsadapter
- a generic string adapter to use to get a String out of evaluated Objects- Since:
- 1.2
isSatisfied
public boolean isSatisfied(String str)
- Checks to see if the initialization
String to is a sub-string of the
argument string being evaluated
- 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)