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 interface:
- 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)
Answer the evaluated value as a primitive boolean |
boolean |
evalBool(VariableValues vv)
|
Object |
evalObject(IndexValues iv)
Answer the evaluated value |
Object |
getValue()
If this Expression is a literal, answer the value of that literal. |
boolean |
isConstant()
Answer true iff this Expression represents a literal [Java object] value. |
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] |
Expression.BoolConstant
public Expression.BoolConstant(boolean value)
isConstant
public boolean isConstant()
- Description copied from interface:
Expression
- Answer true iff this Expression represents a literal [Java object] value.
- Specified by:
isConstant
in interface Expression
- Overrides:
isConstant
in class Expression.Base
getValue
public 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, 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]
- Specified by:
prepare
in interface Expression
evalBool
public boolean evalBool(VariableValues vv)
evalBool
public boolean evalBool(IndexValues vv)
- Description copied from interface:
Valuator
- Answer the evaluated value as a primitive boolean
- Specified by:
evalBool
in interface Valuator
- Parameters:
vv
- the mapping from variable (indexes) to values
evalObject
public Object evalObject(IndexValues iv)
- Description copied from interface:
Valuator
- Answer the evaluated value
- Specified by:
evalObject
in interface Valuator
- Parameters:
iv
- the mapping from variable (indexes) to values
Licenced under the Apache License, Version 2.0