public class Memoize
extends java.lang.Object
| Constructor and Description |
|---|
Memoize() |
| Modifier and Type | Method and Description |
|---|---|
static <T1,T2,R> <any> |
memoizeBiFunction(<any> fn)
Convert a BiFunction into one that caches it's result
|
static <T1,T2,R> <any> |
memoizeBiFunction(<any> fn,
com.aol.cyclops.functions.caching.Cacheable<R> cache)
Convert a BiFunction into one that caches it's result
|
static <T> java.util.concurrent.Callable<T> |
memoizeCallable(java.util.concurrent.Callable<T> s)
Convert a Callable into one that caches it's result
|
static <T> java.util.concurrent.Callable<T> |
memoizeCallable(java.util.concurrent.Callable<T> s,
com.aol.cyclops.functions.caching.Cacheable<T> cache)
Convert a Callable into one that caches it's result
|
static <T,R> java.util.function.Function<T,R> |
memoizeFunction(<any> fn)
Convert a Function into one that caches it's result
|
static <T,R> java.util.function.Function<T,R> |
memoizeFunction(<any> fn,
com.aol.cyclops.functions.caching.Cacheable<R> cache)
Convert a Function into one that caches it's result
|
static <T> <any> |
memoizeFunction0(<any> s)
Convert a Function0 into one that caches it's result
|
static <T> <any> |
memoizeFunction0(<any> s,
com.aol.cyclops.functions.caching.Cacheable<T> cache)
Convert a Function0 into one that caches it's result
|
static <T> java.util.function.Predicate<T> |
memoizePredicate(java.util.function.Predicate<T> p)
Convert a Predicate into one that caches it's result
|
static <T> java.util.function.Predicate<T> |
memoizePredicate(java.util.function.Predicate<T> p,
com.aol.cyclops.functions.caching.Cacheable<java.lang.Boolean> cache)
Convert a Predicate into one that caches it's result
|
static <T1,T2,T3,T4,R> |
memoizeQuadFunction(<any> fn)
Convert a QuadFunction into one that caches it's result
|
static <T1,T2,T3,T4,R> |
memoizeQuadFunction(<any> fn,
com.aol.cyclops.functions.caching.Cacheable<R> cache)
Convert a QuadFunction into one that caches it's result
|
static <T1,T2,T3,R> |
memoizeTriFunction(<any> fn)
Convert a Function3 into one that caches it's result
|
static <T1,T2,T3,R> |
memoizeTriFunction(<any> fn,
com.aol.cyclops.functions.caching.Cacheable<R> cache)
Convert a Function3 into one that caches it's result
|
public static <T> <any> memoizeFunction0(<any> s)
s - Function0 to memoisepublic static <T> <any> memoizeFunction0(<any> s,
com.aol.cyclops.functions.caching.Cacheable<T> cache)
s - Function0 to memoisecache - Cacheable to store the resultspublic static <T> java.util.concurrent.Callable<T> memoizeCallable(java.util.concurrent.Callable<T> s,
com.aol.cyclops.functions.caching.Cacheable<T> cache)
s - Callable to memoisecache - Cacheable to store the resultspublic static <T> java.util.concurrent.Callable<T> memoizeCallable(java.util.concurrent.Callable<T> s)
s - Callable to memoisepublic static <T,R> java.util.function.Function<T,R> memoizeFunction(<any> fn)
fn - Function to memoisepublic static <T,R> java.util.function.Function<T,R> memoizeFunction(<any> fn,
com.aol.cyclops.functions.caching.Cacheable<R> cache)
fn - Function to memoisecache - Cacheable to store the resultspublic static <T1,T2,R> <any> memoizeBiFunction(<any> fn)
fn - BiFunction to memoisepublic static <T1,T2,R> <any> memoizeBiFunction(<any> fn,
com.aol.cyclops.functions.caching.Cacheable<R> cache)
fn - BiFunction to memoisecache - Cacheable to store the resultspublic static <T1,T2,T3,R> <any> memoizeTriFunction(<any> fn)
fn - TriFunction to memoisepublic static <T1,T2,T3,R> <any> memoizeTriFunction(<any> fn,
com.aol.cyclops.functions.caching.Cacheable<R> cache)
fn - TriFunction to memoisecache - Cacheable to store the resultspublic static <T1,T2,T3,T4,R> <any> memoizeQuadFunction(<any> fn)
fn - QuadFunction to memoisepublic static <T1,T2,T3,T4,R> <any> memoizeQuadFunction(<any> fn,
com.aol.cyclops.functions.caching.Cacheable<R> cache)
fn - QuadFunction to memoisecache - Cacheable to store the resultspublic static <T> java.util.function.Predicate<T> memoizePredicate(java.util.function.Predicate<T> p)
p - Predicate to memoisepublic static <T> java.util.function.Predicate<T> memoizePredicate(java.util.function.Predicate<T> p,
com.aol.cyclops.functions.caching.Cacheable<java.lang.Boolean> cache)
p - Predicate to memoisecache - Cacheable to store the results