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 StringLength

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.StringLength

public class StringLength
extends StringCondition

A Condition object that tests for String length values. The arguments being evaluated are adapted to a String first using a StringAdapter and then the length of the string will be compared with the initialization numeric values to see if it is equal/in-range.


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
StringLength (int length)
          A simple constructor that takes one int argument to test strings' length against It evaluates to true when the evaluated String length equals the length initialization argument.
StringLength (int length, IDataTypeAdapter< String> adapter)
          A constructor that takes one int argument to test strings' length against and a StringAdapter.
StringLength (int lowerBound, int upperBound)
          A constructor that takes two int arguments representing a range to test strings' length against.
StringLength (int lowerBound, int upperBound, IDataTypeAdapter< String> adapter)
          A constructor that takes two int arguments representing a range to test strings' length against.
StringLength (int lowerBound, int upperBound, StringAdapter adapter)
          A constructor that takes two int arguments representing a range to test strings' length against.
StringLength (int length, StringAdapter adapter)
          A constructor that takes one int argument to test strings' length against and a StringAdapter.
 
Method Summary
 boolean isSatisfied ( String str)
          An abstract method that answers whether the argument string satisfies this StringCondition
 
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

StringLength

public StringLength(int length)
A simple constructor that takes one int argument to test strings' length against It evaluates to true when the evaluated String length equals the length initialization argument. It defaults to using the StringAdapter.DEFAULT for adapting the evaluated object to string before getting their length.

Parameters:
length - The int value that the evaluated string length must match

StringLength

public StringLength(int length,
                    
StringAdapter adapter)
A constructor that takes one int argument to test strings' length against and a StringAdapter. It evaluates to true when the evaluated String length equals the length initialization argument. It uses the argument StringAdapter for adapting the evaluated object to string before getting their length.

Parameters:
length - The int value that the evaluated string length must match
adapter - The StringAdapter to use to get a String out of evaluated Objects

StringLength

public StringLength(int length,
                    
IDataTypeAdapter<
String> adapter)
A constructor that takes one int argument to test strings' length against and a StringAdapter. It evaluates to true when the evaluated String length equals the length initialization argument. It uses the argument StringAdapter for adapting the evaluated object to string before getting their length.

Parameters:
length - The int value that the evaluated string length must match
adapter - a generic string adapter to use to get a String out of evaluated Objects
Since:
1.2

StringLength

public StringLength(int lowerBound,
                    int upperBound)
A constructor that takes two int arguments representing a range to test strings' length against. It evaluates to true when the evaluated String length is equal to any these two int values passed or fall in between. It defaults to using the StringAdapter.DEFAULT for adapting the evaluated object to string before getting their length.

Parameters:
lowerBound - the int value representing the lower-bound in range testing
upperBound - the int value representing the upper-bound in range testing

StringLength

public StringLength(int lowerBound,
                    int upperBound,
                    
StringAdapter adapter)
A constructor that takes two int arguments representing a range to test strings' length against. It evaluates to true when the evaluated String length is equal to any these two int values passed or fall in between. It uses the argument StringAdapter for adapting the evaluated object to string before getting their length.

Parameters:
lowerBound - the int value representing the lower-bound in range testing
upperBound - the int value representing the upper-bound in range testing
adapter - The StringAdapter to use to get a String out of evaluated Objects

StringLength

public StringLength(int lowerBound,
                    int upperBound,
                    
IDataTypeAdapter<
String> adapter)
A constructor that takes two int arguments representing a range to test strings' length against. It evaluates to true when the evaluated String length is equal to any these two int values passed or fall in between. It uses the argument StringAdapter for adapting the evaluated object to string before getting their length.

Parameters:
lowerBound - the int value representing the lower-bound in range testing
upperBound - the int value representing the upper-bound in range testing
adapter - a generic string adapter to use to get a String out of evaluated Objects
Method Detail

isSatisfied

public boolean isSatisfied(
String str)
Description copied from class: StringCondition
An abstract method that answers whether the argument string satisfies this StringCondition

Specified by:
isSatisfied in class StringCondition
Parameters:
str - The String to evaluate
Returns:
boolean true if the argument string satisfies this StringCondition, false otherwise

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