|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object endrov.util.lazy.ForgetfulMemoize<E>
public abstract class ForgetfulMemoize<E>
Lazy evaluation and memoization and forgetting. Haskell semantics for java with a twist. The idea is that cheap results can be thrown away, "forgetting". This has no effect on pure functions except trading memory for CPU. Forgetting is currently not implemented.
Constructor Summary | |
---|---|
ForgetfulMemoize()
|
Method Summary | |
---|---|
protected abstract E |
eval()
Evaluate value |
E |
get()
Get value, evaluate if required. |
E |
getPermanent()
|
boolean |
isPermanent()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ForgetfulMemoize()
Method Detail |
---|
public E get()
public E getPermanent()
public boolean isPermanent()
protected abstract E eval()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |