|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjpaul.Misc.Function<TArg,TRes>
jpaul.Misc.CachedFunction<TArg,TRes>
public class CachedFunction<TArg,TRes>
CachedFunction is a caching wrapper around a (presumably pure) function.
| Constructor Summary | |
|---|---|
CachedFunction(Function<TArg,TRes> func)
Constructs a caching wrapper around the function func. |
|
| Method Summary | |
|---|---|
TRes |
f(TArg arg)
Takes a TRes and returns a TArg. |
| Methods inherited from class jpaul.Misc.Function |
|---|
comp |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CachedFunction(Function<TArg,TRes> func)
func. func should be
(observationally) pure (we have no way of checking this, so
impure functions are likely to result in hard to find
errors).
| Method Detail |
|---|
public TRes f(TArg arg)
FunctionTRes and returns a TArg. The real
function!
f in class Function<TArg,TRes>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||