kactoos-jvm / nnl.rocks.kactoos.func / StickyFunc
class StickyFunc<in X :
Any
, out Y :
Any
> :
Func
<
X
,
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
Name | Summary |
---|---|
<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. |
Name | Summary |
---|---|
apply | fun apply(input: X ): Y Apply it. |