Lines Matching defs:supplier
45 Supplier<Integer> fiveSupplier = new Supplier<Integer>() {
60 Supplier<Integer> squareSupplier = Suppliers.compose(intValueFunction,
67 Supplier<ArrayList<Integer>> listSupplier
68 = new Supplier<ArrayList<Integer>>() {
85 Supplier<List<Integer>> addSupplier = Suppliers.compose(addElementFunction,
93 static class CountingSupplier implements Supplier<Integer>, Serializable {
105 Supplier<Integer> memoizedSupplier = Suppliers.memoize(countingSupplier);
111 Supplier<Integer> memoizedSupplier = Suppliers.memoize(countingSupplier);
118 Supplier<Integer> memoizedSupplier = Suppliers.memoize(countingSupplier);
120 // Calls to the original memoized supplier shouldn't affect its copy.
123 Supplier<Integer> copy = reserialize(memoizedSupplier);
132 CountingSupplier countingSupplier, Supplier<Integer> memoizedSupplier) {
133 // the underlying supplier hasn't executed yet
148 Supplier<Integer> exceptingSupplier = new Supplier<Integer>() {
155 Supplier<Integer> memoizedSupplier = Suppliers.memoize(exceptingSupplier);
173 Supplier<Integer> memoizedSupplier = Suppliers.memoizeWithExpiration(
184 Supplier<Integer> memoizedSupplier = Suppliers.memoizeWithExpiration(
186 // Calls to the original memoized supplier shouldn't affect its copy.
189 Supplier<Integer> copy = reserialize(memoizedSupplier);
199 CountingSupplier countingSupplier, Supplier<Integer> memoizedSupplier)
201 // the underlying supplier hasn't executed yet
225 Supplier<Object> objectSupplier = Suppliers.ofInstance(toBeSupplied);
231 Supplier<Integer> nullSupplier = Suppliers.ofInstance(null);
238 Function<Supplier<Boolean>, Supplier<Boolean>> memoizer =
239 new Function<Supplier<Boolean>, Supplier<Boolean>>() {
240 @Override public Supplier<Boolean> apply(Supplier<Boolean> supplier) {
242 supplier, Long.MAX_VALUE, TimeUnit.NANOSECONDS);
251 Function<Supplier<Boolean>, Supplier<Boolean>> memoizer =
252 new Function<Supplier<Boolean>, Supplier<Boolean>>() {
253 @Override public Supplier<Boolean> apply(Supplier<Boolean> supplier) {
254 return Suppliers.memoize(supplier);
262 Function<Supplier<Boolean>, Supplier<Boolean>> memoizer)
271 final Supplier<Boolean> supplier = new Supplier<Boolean>() {
302 " synchronizing on supplier"));
312 final Supplier<Boolean> memoizedSupplier = memoizer.apply(supplier);
338 final Supplier<Integer> nonThreadSafe = new Supplier<Integer>() {
372 Supplier<Integer> supplier = Suppliers.ofInstance(14);
373 Function<Supplier<Integer>, Integer> supplierFunction =
376 assertEquals(14, (int) supplierFunction.apply(supplier));