|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.hp.hpl.jena.graph.query.Expression.Base
An abstract base class for Expressions; over-ride as appropriate. The
sub-classes may be more useful. Base provides an implementation of
prepare which produces a slow Valuator that relies
on the Base's evalBool.
| Nested Class Summary |
| Nested classes inherited from class com.hp.hpl.jena.graph.query.Expression |
Expression.Application, Expression.Base, Expression.BoolConstant, Expression.Literal, Expression.Util, Expression.Valof, Expression.Variable |
| Field Summary |
| Fields inherited from interface com.hp.hpl.jena.graph.query.Expression |
FALSE, TRUE |
| Constructor Summary | |
Expression.Base()
|
|
| Method Summary | |
int |
argCount()
If this Expression is an application, answer the number of arguments that it has. |
Expression |
getArg(int i)
If this Expression is an application, and 0 <= i < argCount(), answer the ith argument. |
java.lang.String |
getFun()
If this Expression is an application, return the string identifying the function, which should be a URI. |
java.lang.String |
getName()
If this Expression is a variable, answer a [non-null] String which is its name. |
java.lang.Object |
getValue()
If this Expression is a literal, answer the value of that literal. |
boolean |
isApply()
Answer true iff this Expression represents the application of some function [or operator] to some arguments [or operands]. |
boolean |
isLiteral()
Answer true iff this Expression represents a literal [Java object] value. |
boolean |
isVariable()
Answer true iff this Expression represents a variable. |
Valuator |
prepare(VariableIndexes vi)
Answer a Valuator which does the same evaluation as this Expression when supplied with a mapping from variable indexes to their values. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.hp.hpl.jena.graph.query.Expression |
evalBool |
| Constructor Detail |
public Expression.Base()
| Method Detail |
public boolean isVariable()
Expression
isVariable in interface Expressionpublic boolean isApply()
Expression
isApply in interface Expressionpublic boolean isLiteral()
Expression
isLiteral in interface Expressionpublic java.lang.String getName()
Expression
getName in interface Expressionpublic java.lang.Object getValue()
Expression
getValue in interface Expressionpublic int argCount()
Expression
argCount in interface Expressionpublic java.lang.String getFun()
Expression
getFun in interface Expressionpublic Expression getArg(int i)
Expressionith argument. Otherwise the behaviour is unspecified.
getArg in interface Expressionpublic Valuator prepare(VariableIndexes vi)
Expressionvi and the
index->value map given to the valuator is equivalent to the VariableValues
map that would be supplied to evalBool.
prepare in interface Expression
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||