|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jclouds.util.Suppliers2
public class Suppliers2
| Constructor Summary | |
|---|---|
Suppliers2()
|
|
| Method Summary | ||
|---|---|---|
static
|
compose(com.google.common.base.Function<? super F,T> function,
com.google.common.base.Supplier<F> supplier)
|
|
static
|
getLastValueInMap(com.google.common.base.Supplier<Map<K,com.google.common.base.Supplier<V>>> input)
|
|
static com.google.common.io.OutputSupplier<OutputStream> |
newOutputStreamSupplier(OutputStream output)
converts an OutputStream to an OutputSupplier |
|
static
|
ofInstanceFunction()
|
|
static
|
onThrowable(com.google.common.base.Supplier<T> unlessThrowable,
Class<X> throwable,
com.google.common.base.Supplier<T> fallback)
if a throwable of certain type is encountered on getting the first value, use the fallback. |
|
static
|
or(com.google.common.base.Supplier<T> unlessNull,
com.google.common.base.Supplier<T> fallback)
returns the value of the first supplier, or the value of the fallback, if the unlessNull is null. |
|
static
|
valueForKey(com.google.common.base.Supplier<Map<K,com.google.common.base.Supplier<V>>> input,
com.google.common.base.Supplier<K> key)
Supplies a value that corresponds to a particular key in a map, or null, if not found |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Suppliers2()
| Method Detail |
|---|
public static <K,V> com.google.common.base.Supplier<V> valueForKey(com.google.common.base.Supplier<Map<K,com.google.common.base.Supplier<V>>> input,
com.google.common.base.Supplier<K> key)
public static <K,V> com.google.common.base.Supplier<V> getLastValueInMap(com.google.common.base.Supplier<Map<K,com.google.common.base.Supplier<V>>> input)
public static <X> com.google.common.base.Function<X,com.google.common.base.Supplier<X>> ofInstanceFunction()
public static com.google.common.io.OutputSupplier<OutputStream> newOutputStreamSupplier(OutputStream output)
OutputStream to an OutputSupplier
@Beta
public static <T> com.google.common.base.Supplier<T> or(com.google.common.base.Supplier<T> unlessNull,
com.google.common.base.Supplier<T> fallback)
@Beta
public static <T,X extends Throwable> com.google.common.base.Supplier<T> onThrowable(com.google.common.base.Supplier<T> unlessThrowable,
Class<X> throwable,
com.google.common.base.Supplier<T> fallback)
public static <F,T> com.google.common.base.Supplier<T> compose(com.google.common.base.Function<? super F,T> function,
com.google.common.base.Supplier<F> supplier)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||