|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hp.hpl.jena.graph.query.Expression.Base com.hp.hpl.jena.graph.query.Expression.Application com.hp.hpl.jena.graph.query.Dyadic
public abstract class Dyadic
A base class for dyadic expressions with a built-in Valuator; subclasses must define an evalObject or evalBool method which will be supplied with the evaluated operands.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.hp.hpl.jena.graph.query.Expression |
---|
Expression.Application, Expression.Base, Expression.BoolConstant, Expression.Constant, Expression.Fixed, Expression.Util, Expression.Valof, Expression.Variable |
Field Summary |
---|
Fields inherited from interface com.hp.hpl.jena.graph.query.Expression |
---|
FALSE, TRUE |
Constructor Summary | |
---|---|
Dyadic(Expression L,
String F,
Expression R)
|
Method Summary | |
---|---|
static Expression |
and(Expression L,
Expression R)
|
int |
argCount()
If this Expression is an application, answer the number of arguments that it has. |
boolean |
evalBool(Object l,
Object r)
Answer the boolean result of evaluating this dyadic expression with the given arguments l and r . |
Object |
evalObject(Object l,
Object r)
Answer the Object result of evaluating this dyadic expression with the given arguments l and r . |
Expression |
getArg(int i)
If this Expression is an application, and 0 <= i < argCount(), answer the i th argument. |
String |
getFun()
If this Expression is an application, return the string identifying the function, which should be a URI. |
Valuator |
prepare(VariableIndexes vi)
Answer a Valuator which, when run with a set of index-to-value bindings, evaluates this expression in the light of the given variable-to-index bindings [ie as though the variables were bound to the corresponding values] |
String |
toString()
|
Methods inherited from class com.hp.hpl.jena.graph.query.Expression.Application |
---|
isApply |
Methods inherited from class com.hp.hpl.jena.graph.query.Expression.Base |
---|
equals, getName, getValue, isConstant, isVariable |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Dyadic(Expression L, String F, Expression R)
Method Detail |
---|
public int argCount()
Expression
argCount
in interface Expression
argCount
in class Expression.Application
public Expression getArg(int i)
Expression
i
th argument. Otherwise the behaviour is unspecified.
getArg
in interface Expression
getArg
in class Expression.Application
public String getFun()
Expression
getFun
in interface Expression
getFun
in class Expression.Application
public Object evalObject(Object l, Object r)
l
and r
.
Either this method or evalBool
must be
over-ridden in concrete sub-classes.
public boolean evalBool(Object l, Object r)
l
and r
.
Either this method or evalObject
must be
over-ridden in concrete sub-classes.
public Valuator prepare(VariableIndexes vi)
Expression
public String toString()
toString
in class Object
public static Expression and(Expression L, Expression R)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |