com.taco.util
Class DelayedResultForcer

java.lang.Object
  extended by com.taco.util.DelayedResultForcer
All Implemented Interfaces:
IObjectMapper

public final class DelayedResultForcer
extends java.lang.Object
implements IObjectMapper

An object mapper which forces the evaluation of delayed results. This is useful for unwrapping delayed results put into a map.


Field Summary
static DelayedResultForcer instance
          The singleton instance of this class.
 
Constructor Summary
DelayedResultForcer()
           
 
Method Summary
 java.lang.Object map(java.lang.Object obj)
          If obj is null, return null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

public static final DelayedResultForcer instance
The singleton instance of this class.

Constructor Detail

DelayedResultForcer

public DelayedResultForcer()
Method Detail

map

public java.lang.Object map(java.lang.Object obj)
If obj is null, return null. If obj is an instance of IDelayedResult, return the result of forcing the computation of the result. Otherwise, return obj unchanged.

Specified by:
map in interface IObjectMapper