|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectConstant
public class Constant
A Constant is an expression with a directly specified value.
Constructor Summary | |
---|---|
Constant(java.lang.Object obj)
Creates a Constant for a Value representing the specified Object. |
|
Constant(Value value)
Creates a Constant with the specified Value. |
Method Summary | |
---|---|
Value |
eval(Environment env)
Evaluate this expression. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Constant(java.lang.Object obj)
obj
- the Object to be packaged into a BoxedValuepublic Constant(Value value)
value
- the Value the expression should evaluate toMethod Detail |
---|
public Value eval(Environment env)
Expression
eval
in interface Expression
env
- the environment in which the expression should be evaluated
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |