|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.openrdf.sesame.sail.query.ValueCompare
A comparison between two values.
| Field Summary | |
static int |
EQ
equal to |
static int |
GE
greater than or equal to |
static int |
GT
greater than |
static int |
LE
lower than or equal to |
static int |
LT
lower than |
static int |
NE
not equal to |
| Constructor Summary | |
ValueCompare(ValueExpr leftArg,
ValueExpr rightArg)
|
|
ValueCompare(ValueExpr leftArg,
ValueExpr rightArg,
int op)
|
|
| Method Summary | |
ValueExpr |
getLeftArg()
|
int |
getOperator()
|
ValueExpr |
getRightArg()
|
void |
getVariables(Collection variables)
Gets all variables that are used in this BooleanExpr. |
boolean |
isTrue(RdfSource rdfSource)
Evaluates the boolean expression on the supplied RdfSource object. |
static boolean |
isTrue(Value leftVal,
Value rightVal,
int operator)
|
static String |
operator2string(int op)
Gives a string representation of the specified operator code. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int EQ
public static final int NE
public static final int LT
public static final int LE
public static final int GE
public static final int GT
| Constructor Detail |
public ValueCompare(ValueExpr leftArg,
ValueExpr rightArg)
public ValueCompare(ValueExpr leftArg,
ValueExpr rightArg,
int op)
| Method Detail |
public ValueExpr getLeftArg()
public ValueExpr getRightArg()
public int getOperator()
public void getVariables(Collection variables)
BooleanExpr
getVariables in interface BooleanExprvariables - A Collection to add the Var objects to.
public boolean isTrue(RdfSource rdfSource)
throws BooleanExprEvaluationException
BooleanExpr
isTrue in interface BooleanExprrdfSource - The RdfSource to evaluate the boolean expression against.
BooleanExprEvaluationException - If the boolean expression could
not be evaluated, for example when comparing two incompatible operands.
When thrown, the result of the boolean expression is neither
true or false, but unknown.
public static boolean isTrue(Value leftVal,
Value rightVal,
int operator)
throws BooleanExprEvaluationException
BooleanExprEvaluationExceptionpublic static String operator2string(int op)
op - One of Compare.EQ, Compare.NE,
ValueCompare.LT, ValueCompare.LE,
ValueCompare.GE or ValueCompare.GT.
IllegalArgumentException - If the specified operator code is
an illegal code.public String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||