public static class Expression.BoolConstant extends Expression.Base implements Expression, Valuator
TRUE
and FALSE
.Expression.Application, Expression.Base, Expression.BoolConstant, Expression.Constant, Expression.Fixed, Expression.Util, Expression.Valof, Expression.Variable
FALSE, TRUE
Constructor and Description |
---|
Expression.BoolConstant(boolean value) |
Modifier and Type | Method and Description |
---|---|
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]
|
argCount, equals, getArg, getFun, getName, isApply, isVariable
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
argCount, getArg, getFun, getName, isApply, isVariable
public boolean isConstant()
Expression
isConstant
in interface Expression
isConstant
in class Expression.Base
public Object getValue()
Expression
getValue
in interface Expression
getValue
in class Expression.Base
public Valuator prepare(VariableIndexes vi)
Expression
prepare
in interface Expression
public boolean evalBool(VariableValues vv)
public boolean evalBool(IndexValues vv)
Valuator
public Object evalObject(IndexValues iv)
Valuator
evalObject
in interface Valuator
iv
- the mapping from variable (indexes) to valuesCopyright ? 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP