MCPcopy Create free account
hub / github.com/antlr/codebuff / compose

Method compose

output/java_guava/1.4.17/Suppliers.java:47–51  ·  view source on GitHub ↗

Returns a new supplier which is the composition of the provided function and supplier. In other words, the new supplier's value will be computed by retrieving the value from supplier, and then applying function to that value. Note that the resulting supplier will not call {@code supp

(Function<? super F, T> function, Supplier<F> supplier)

Source from the content-addressed store, hash-verified

45
46
47 public static <F, T> Supplier<T> compose(Function<? super F, T> function, Supplier<F> supplier) {
48 Preconditions.checkNotNull(function);
49 Preconditions.checkNotNull(supplier);
50 return new SupplierComposition<F, T>(function, supplier);
51 }
52
53 private static class SupplierComposition<F, T> implements Supplier<T>, Serializable {
54 final Function<? super F, T> function;

Callers 4

keyPredicateOnEntriesMethod · 0.45
retainAllMethod · 0.45
removeAllMethod · 0.45

Calls 1

checkNotNullMethod · 0.95

Tested by

no test coverage detected