Interface Value

All Known Subinterfaces:
Function
All Known Implementing Classes:
BoxedValue, Closure, FunctionBase, IntComparison, IntOperation, PrimitiveFunction, ValueBase

public interface Value

Represents a value processed by the interpreted program.

Author:
max

Method Summary
<T> T
as(java.lang.Class<T> type)
          Retrieves the underlying object represented by this Value.
 

Method Detail

as

<T> T as(java.lang.Class<T> type)
Retrieves the underlying object represented by this Value. For example, if the value represents an integer, this could be used to convert from the Value type to Integer.

Parameters:
type - is what this Value is expected to represent
Returns:
an instance of type that is represented by this Value
Throws:
java.lang.ClassCastException - if the expectation isn't met