org.eclipse.emf.query.conditions.strings
Class SubStringValue

java.lang.Object
  extended byorg.eclipse.emf.query.conditions.Condition
      extended byorg.eclipse.emf.query.conditions.strings.StringCondition
          extended byorg.eclipse.emf.query.conditions.strings.StringValue
              extended byorg.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.


Field Summary
 
Fields inherited from class org.eclipse.emf.query.conditions.Condition
FALSE, TRUE
 
Constructor Summary
SubStringValue(java.lang.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(java.lang.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(java.lang.String subString, boolean caseSensitive, StringAdapter adpater)
          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(java.lang.String subString, StringAdapter adpater)
          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(java.lang.String str)
          Checks to see if the initialization String to is a sub-string of the argument string being evaluated
 
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

SubStringValue

public SubStringValue(java.lang.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(java.lang.String subString,
                      StringAdapter adpater)
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 evaluated
adpater - The StringAdapter to use to get a String out of evaluated Objects

SubStringValue

public SubStringValue(java.lang.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 evaluated
caseSensitive - A boolean value specifying whether to use case in matching strings

SubStringValue

public SubStringValue(java.lang.String subString,
                      boolean caseSensitive,
                      StringAdapter adpater)
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 evaluated
caseSensitive - A boolean value specifying whether to use case in matching strings
adpater - The StringAdapter to use to get a String out of evaluated Objects
Method Detail

isSatisfied

public boolean isSatisfied(java.lang.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
See Also:
StringCondition.isSatisfied(java.lang.String)

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