|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.util.concurrent.Suppliers
public final class Suppliers
Useful Supplier
implementations.
Method Summary | ||
---|---|---|
static
|
fromFunction(D input,
Function<D,T> function)
A Supplier that asks the argument function for the result using
the input argument. |
|
static
|
memoize(T source)
A Supplier that always returns the supplied source. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> Supplier<T> memoize(T source)
Supplier
that always returns the supplied source.
T
- the typesource
- the object that is always returned.
public static <D,T> Supplier<T> fromFunction(D input, Function<D,T> function)
Supplier
that asks the argument function for the result using
the input argument.
D
- the input typeT
- the result typeinput
- used as the argument when calling the function.function
- asked to get the result.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |