Class ValueBase

java.lang.Object
  extended by ValueBase
All Implemented Interfaces:
Value
Direct Known Subclasses:
BoxedValue, FunctionBase

public abstract class ValueBase
extends java.lang.Object
implements Value

An abstract class providing much of the code for the Value interface. Extending this abstract base class is a convenient way for an implementation of Value to meet the obligation imposed by that interface.

Author:
max

Constructor Summary
ValueBase()
           
 
Method Summary
<T> T
as(java.lang.Class<T> type)
          Retrieves the underlying object represented by this Value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueBase

public ValueBase()
Method Detail

as

public <T> T as(java.lang.Class<T> type)
Description copied from interface: Value
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.

Specified by:
as in interface Value
Parameters:
type - is what this Value is expected to represent
Returns:
an instance of type that is represented by this Value