org.millscript.millscript.datatypes
Class Deferred<T>

java.lang.Object
  extended by org.millscript.millscript.datatypes.Deferred<T>
Direct Known Subclasses:
DeferredSoftReference

public abstract class Deferred<T>
extends java.lang.Object

This is the parent of all deferred objects. A deferred object is one whose value is unknown until the variable is used.


Constructor Summary
Deferred()
           
 
Method Summary
abstract  T get()
          Returns the value associated with this deferred object.
 java.lang.String toString()
          Returns the string representation of this deferred object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Deferred

public Deferred()
Method Detail

get

public abstract T get()
Returns the value associated with this deferred object. If the deferred value hasn't already been calculated, the calculate method should be called to do that.

Returns:
the value of this deferred object.

toString

public final java.lang.String toString()
Returns the string representation of this deferred object. This will cause the defered object to be calculated and the deferred values string representation will be returned.

Overrides:
toString in class java.lang.Object
Returns:
a String containing a representation of this deferred object


Copyright © 2001-2007 Open World Ltd. All Rights Reserved.