| java.lang.Object org.cougaar.util.Memo
Memo | public class Memo (Code) | | A "memoization" utility - as long as the specified condition object
doesn't change, then the result doesn't change.
|
Inner Class :public static interface Function | |
Method Summary | |
public synchronized Object | eval(Object p) Compute the result of applying the Memo's function to the parameter. | public synchronized Object | evalIfNew(Object p) Similar to #eval(Object), except will return the result of applying
the function to the parameter IFF the function was actually called. | public static Memo | get(Memo.Function f) |
eval | public synchronized Object eval(Object p)(Code) | | Compute the result of applying the Memo's function to the parameter.
The function might not actually be run if the parameter's value is ==
the previous value (if any).
|
evalIfNew | public synchronized Object evalIfNew(Object p)(Code) | | Similar to #eval(Object), except will return the result of applying
the function to the parameter IFF the function was actually called.
This allows the caller to easily abort a sequence of events if
the previous computation is still in force.
|
|
|