com.hp.hpl.jena.graph.query
Class Expression.BoolConstant

java.lang.Object
  extended by com.hp.hpl.jena.graph.query.Expression.Base
      extended by 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.


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
Expression.BoolConstant(boolean value)
           
 
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]
 
Methods inherited from class com.hp.hpl.jena.graph.query.Expression.Base
argCount, equals, getArg, getFun, getName, isApply, isVariable
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.jena.graph.query.Expression
argCount, getArg, getFun, getName, isApply, isVariable
 

Constructor Detail

Expression.BoolConstant

public Expression.BoolConstant(boolean value)
Method Detail

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