org.josql.expressions
Class GTLTExpression
java.lang.Object
org.josql.expressions.Expression
org.josql.expressions.BinaryExpression
org.josql.expressions.GTLTExpression
public class GTLTExpression
- extends BinaryExpression
This class represents one of the following:
- > - Greater than
- < - Less than
- >= - Greater than or equal to
- <= - Less than or equal to
You can also force a "string" comparison by prefixing with "$". This will force
both sides to be strings via the toString method.
GTLTExpression
public GTLTExpression()
getType
public int getType()
setType
public void setType(int t)
- Type is an integer here for speed purposes, however one of the constants
should be used.
- Parameters:
t - The type of expression.
setIgnoreCase
public void setIgnoreCase(boolean v)
isIgnoreCase
public boolean isIgnoreCase()
isTrue
public boolean isTrue(Object o,
Query q)
throws QueryExecutionException
- Return whether this expression evaluates to true. The actual comparison
is performed by:
Utilities.compare(Object,Object) which copes with
the object types.
- Specified by:
isTrue in class Expression
- Parameters:
o - The current object to evaluate the expression on.q - The Query object.
- Returns:
true if the expression evaluates to true.
- Throws:
QueryExecutionException - If the expression cannot be evaluated.
toString
public String toString()
- Return a string version of the expression.
In the form:
Expression [ $ ] <|> [ = ] Expression
- Specified by:
toString in class Expression
- Returns:
- A string version of the expression.
Copyright © 2008 Gary Bentley. All Rights Reserved.