IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.emf.query.conditions.strings
Class SubStringValue

java.lang.Object
  extended bycom.ibm.xtools.emf.query.conditions.Condition
      extended bycom.ibm.xtools.emf.query.conditions.strings.StringCondition
          extended bycom.ibm.xtools.emf.query.conditions.strings.StringValue
              extended bycom.ibm.xtools.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 com.ibm.xtools.emf.query.conditions.Condition
FALSE, TRUE
 
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, 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(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(String str)
          Checks to see if the initialization String to is a sub-string of the argument string being evaluated
 
Methods inherited from class com.ibm.xtools.emf.query.conditions.strings.StringValue
getString, isCaseSensitive
 
Methods inherited from class com.ibm.xtools.emf.query.conditions.strings.StringCondition
isSatisfied
 
Methods inherited from class com.ibm.xtools.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(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 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(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(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(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)

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.