com.bc.jexp
Class Term.ConstB
java.lang.Object
com.bc.jexp.Term
com.bc.jexp.Term.ConstB
- Enclosing class:
- Term
public static final class Term.ConstB
- extends Term
A boolean constant, e.g. true or false.
| Nested classes/interfaces inherited from class com.bc.jexp.Term |
Term.Add, Term.AndB, Term.AndI, Term.Assign, Term.Binary, Term.BinaryB, Term.BinaryI, Term.BinaryN, Term.Call, Term.Cond, Term.ConstB, Term.ConstD, Term.ConstI, Term.ConstS, Term.Div, Term.EqB, Term.EqD, Term.EqI, Term.GeD, Term.GeI, Term.GtD, Term.GtI, Term.LeD, Term.LeI, Term.LtD, Term.LtI, Term.Mod, Term.Mul, Term.Neg, Term.NEqB, Term.NEqD, Term.NEqI, Term.NotB, Term.NotI, Term.Op, Term.OrB, Term.OrI, Term.Ref, Term.Sub, Term.Unary, Term.UnaryB, Term.UnaryI, Term.UnaryN, Term.XOrI |
|
Method Summary |
boolean |
evalB(EvalEnv env)
Evaluates this term to a boolean value. |
double |
evalD(EvalEnv env)
Evaluates this term to a double value. |
int |
evalI(EvalEnv env)
Evaluates this term to an int value. |
int |
getRetType()
Gets the term's "natural" return type. |
boolean |
getValue()
|
String |
toString()
Returns a string representation of this term which
can be used for debugging. |
| Methods inherited from class com.bc.jexp.Term |
evalS, getChildren, isB, isD, isI, isN, toB, toB, toD, toI, toI, toS, toS, toS |
Term.ConstB
public Term.ConstB(boolean value)
getValue
public boolean getValue()
getRetType
public int getRetType()
- Description copied from class:
Term
- Gets the term's "natural" return type.
- Specified by:
getRetType in class Term
- Returns:
- the type, should always be one of the
TYPE_X constants
defined in this class.
evalB
public boolean evalB(EvalEnv env)
- Description copied from class:
Term
- Evaluates this term to a
boolean value.
- Specified by:
evalB in class Term
- Parameters:
env - the application dependant environment.
- Returns:
- a
boolean value
evalI
public int evalI(EvalEnv env)
- Description copied from class:
Term
- Evaluates this term to an
int value.
- Specified by:
evalI in class Term
- Parameters:
env - the application dependant environment.
- Returns:
- an
int value
evalD
public double evalD(EvalEnv env)
- Description copied from class:
Term
- Evaluates this term to a
double value.
- Specified by:
evalD in class Term
- Parameters:
env - the application dependant environment.
- Returns:
- a
double value
toString
public String toString()
- Description copied from class:
Term
- Returns a string representation of this term which
can be used for debugging.
- Specified by:
toString in class Term
Copyright © 2002-2013 Brockmann Consult GmbH. All Rights Reserved.