Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


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

java.lang.Object
  extended by 

org.eclipse.emf.query.conditions.Condition
      extended by 

org.eclipse.emf.query.conditions.DataTypeCondition<
String>
          extended by 

org.eclipse.emf.query.conditions.strings.StringCondition
              extended by 
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.


Field Summary
 
Fields inherited from class org.eclipse.emf.query.conditions. DataTypeCondition
adapter, value
 
Fields inherited from class org.eclipse.emf.query.conditions. Condition
FALSE, TRUE
 
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 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

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
Method Detail

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

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


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire