|
||||||||||
| 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
|
fromGoogleSupplier(com.google.common.base.Supplier<T> supplier)
Map from a google-collections Supplier. |
|
static
|
memoize(T source)
A Supplier that always returns the supplied source. |
|
static
|
toGoogleSupplier(Supplier<T> supplier)
Map to a google-collections Supplier. |
|
| 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.
public static <T> com.google.common.base.Supplier<T> toGoogleSupplier(Supplier<T> supplier)
T - typefunction - the function to map
public static <T> Supplier<T> fromGoogleSupplier(com.google.common.base.Supplier<T> supplier)
T - typefunction - the function to map
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||