kactoos-jvm / nnl.rocks.kactoos.func / StickyFunc / <init>
StickyFunc(func: BiFunc<X, Boolean, Y>)
StickyFunc(fnc: Func<X, Y>, max: Int)
StickyFunc(fnc: Func<X, Y>)StickyFunc(func: KBiFunc<X, Boolean, Y>)
Func that caches previously calculated values and doesn’t recalculate again.
This Func decorator technically is an in-memory cache.
There is no thread-safety guarantee. It is highly recommended to decorate it with SyncFunc
X - Type of input
Y - Type of output
See Also
nnl.rocks.kactoos.scalar.StickyScalar
Since 0.1