com.hp.hpl.jena.graph.query
Class Expression.BoolConstant
java.lang.Object
com.hp.hpl.jena.graph.query.Expression.Base
com.hp.hpl.jena.graph.query.Expression.BoolConstant
- All Implemented Interfaces:
- Expression, Valuator
- Enclosing class:
- Expression
- public static class Expression.BoolConstant
- extends Expression.Base
- implements Expression, Valuator
Base class used to implement TRUE
and FALSE
.
Method Summary |
boolean |
evalBool(IndexValues vv)
|
boolean |
evalBool(VariableValues vv)
Answer true iff the Expression evaluates to true given the variable bindings. |
java.lang.Object |
getValue()
If this Expression is a literal, answer the value of that literal. |
boolean |
isLiteral()
Answer true iff this Expression represents a literal [Java object] value. |
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 |
Expression.BoolConstant
public Expression.BoolConstant(boolean value)
isLiteral
public boolean isLiteral()
- Description copied from interface:
Expression
- Answer true iff this Expression represents a literal [Java object] value.
- Specified by:
isLiteral
in interface Expression
- Overrides:
isLiteral
in class Expression.Base
getValue
public java.lang.Object getValue()
- Description copied from interface:
Expression
- If this Expression is a literal, answer the value of that literal. Otherwise the
behaviour is unspecified.
- Specified by:
getValue
in interface Expression
- Overrides:
getValue
in class Expression.Base
prepare
public Valuator prepare(VariableIndexes vi)
- Description copied from interface:
Expression
- Answer a Valuator which does the same evaluation as this Expression when
supplied with a mapping from variable indexes to their values. The
composition of the variable->index map
vi
and the
index->value map given to the valuator is equivalent to the VariableValues
map that would be supplied to evalBool
.
- Specified by:
prepare
in interface Expression
- Overrides:
prepare
in class Expression.Base
evalBool
public boolean evalBool(VariableValues vv)
- Description copied from interface:
Expression
- Answer true iff the Expression evaluates to true given the variable bindings.
- Specified by:
evalBool
in interface Expression
- Parameters:
vv
- the mapping from variable[ name]s to their values
evalBool
public boolean evalBool(IndexValues vv)
- Specified by:
evalBool
in interface Valuator
Copyright © 2000-2003 Hewlett-Packard. All Rights Reserved.