org.josql.expressions
Class EqualsExpression
java.lang.Object
org.josql.expressions.Expression
org.josql.expressions.BinaryExpression
org.josql.expressions.EqualsExpression
public class EqualsExpression
- extends BinaryExpression
This class represents an "=" or "!=" expression. This class also provides the
ability for the developer to prefix the "=" or "!=" with "$" to indicate that a
case-insensitive comparison should be made, in which case the LHS and RHS
are converted to strings first.
ignoreCase
public boolean ignoreCase
EqualsExpression
public EqualsExpression()
setIgnoreCase
public void setIgnoreCase(boolean v)
isIgnoreCase
public boolean isIgnoreCase()
isNot
public boolean isNot()
setNot
public void setNot(boolean v)
isTrue
public boolean isTrue(Object o,
Query q)
throws QueryExecutionException
- Return whether this expression evaluates to
true
.
- Specified by:
isTrue
in class Expression
- Parameters:
o
- The current object to perform the expression on.q
- The Query object.
- Returns:
true
if the expression evaluates to true
, false
otherwise.
- 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:
- The string version.
Copyright © 2008 Gary Bentley. All Rights Reserved.