Home
last modified time | relevance | path

Searched refs:Supplier (Results 1 – 25 of 73) sorted by relevance

123

/libcore/luni/src/test/java/libcore/java/util/
DRemoveIfTester.java22 import java.util.function.Supplier;
35 public static void runBasicRemoveIfTests(Supplier<Collection<Integer>> supp) { in runBasicRemoveIfTests()
56 public static void runBasicRemoveIfTestsUnordered(Supplier<Collection<Integer>> supp) { in runBasicRemoveIfTestsUnordered()
75 public static void runRemoveIfOnEmpty(Supplier<Collection<Integer>> supp) { in runRemoveIfOnEmpty()
82 public static void testRemoveIfNPE(Supplier<Collection<Integer>> supp) { in testRemoveIfNPE()
89 public static void testRemoveIfCME(Supplier<Collection<Integer>> supp) { in testRemoveIfCME()
/libcore/ojluni/src/main/java/java/lang/reflect/
DWeakCache.java33 import java.util.function.Supplier;
62 private final ConcurrentMap<Object, ConcurrentMap<Object, Supplier<V>>> map
64 private final ConcurrentMap<Supplier<V>, Boolean> reverseMap
108 ConcurrentMap<Object, Supplier<V>> valuesMap = map.get(cacheKey); in get()
110 ConcurrentMap<Object, Supplier<V>> oldValuesMap in get()
121 Supplier<V> supplier = valuesMap.get(subKey); in get()
198 private final class Factory implements Supplier<V> {
203 private final ConcurrentMap<Object, Supplier<V>> valuesMap;
206 ConcurrentMap<Object, Supplier<V>> valuesMap) { in Factory()
216 Supplier<V> supplier = valuesMap.get(subKey); in get()
[all …]
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DSpliteratorTest.java33 import java.util.function.Supplier;
48 public void testSpliterator(String name, Supplier<Spliterator<Integer>> supplier) { in testSpliterator()
53 public void testIntSpliterator(String name, Supplier<Spliterator.OfInt> supplier) { in testIntSpliterator()
58 public void testLongSpliterator(String name, Supplier<Spliterator.OfLong> supplier) { in testLongSpliterator()
63 public void testDoubleSpliterator(String name, Supplier<Spliterator.OfDouble> supplier) { in testDoubleSpliterator()
DMatchOpTest.java45 import java.util.function.Supplier;
135 final Supplier<Iterator<Integer>> source; in testInfinite()
138 CycleIterator(Supplier<Iterator<Integer>> source) { in testInfinite()
159 Supplier<Iterator<Integer>> source = () -> Arrays.asList(1, 2, 3, 4).iterator(); in testInfinite()
160Supplier<Stream<Integer>> s = () -> StreamSupport.stream(Spliterators.spliteratorUnknownSize(new C… in testInfinite()
183 …private void assertIntPredicates(Supplier<IntStream> source, Kind kind, IntPredicate[] predicates,… in assertIntPredicates()
220 final Supplier<PrimitiveIterator.OfInt> source; in testIntInfinite()
223 CycleIterator(Supplier<PrimitiveIterator.OfInt> source) { in testIntInfinite()
244Supplier<PrimitiveIterator.OfInt> source = () -> Arrays.stream(new int[]{1, 2, 3, 4}).iterator(); in testIntInfinite()
245Supplier<IntStream> s = () -> StreamSupport.intStream(Spliterators.spliteratorUnknownSize(new Cycl… in testIntInfinite()
[all …]
DCollectionAndMapModifyStreamTest.java39 import java.util.function.Supplier;
114 Map<String, Supplier<Map<Integer, Integer>>> maps = new HashMap<>(); in createMaps()
136 for (Map.Entry<String, Supplier<Map<Integer, Integer>>> e : maps.entrySet()) { in createMaps()
145 public void testMapKeysSizeRemove(String name, Supplier<Map<Integer, Integer>> c) { in testMapKeysSizeRemove()
150 public void testMapValuesSizeRemove(String name, Supplier<Map<Integer, Integer>> c) { in testMapValuesSizeRemove()
155 public void testMapEntriesSizeRemove(String name, Supplier<Map<Integer, Integer>> c) { in testMapEntriesSizeRemove()
/libcore/dalvik/src/main/java/dalvik/system/
DRuntimeHooks.java23 import java.util.function.Supplier;
41 private static Supplier<String> zoneIdSupplier;
62 public static void setTimeZoneIdSupplier(Supplier<String> zoneIdSupplier) { in setTimeZoneIdSupplier()
73 public static Supplier<String> getTimeZoneIdSupplier() { in getTimeZoneIdSupplier()
/libcore/ojluni/src/main/java/java/util/stream/
DStreamSupport.java29 import java.util.function.Supplier;
107 public static <T> Stream<T> stream(Supplier<? extends Spliterator<T>> supplier, in stream()
175 public static IntStream intStream(Supplier<? extends Spliterator.OfInt> supplier, in intStream()
243 public static LongStream longStream(Supplier<? extends Spliterator.OfLong> supplier, in longStream()
311 public static DoubleStream doubleStream(Supplier<? extends Spliterator.OfDouble> supplier, in doubleStream()
DTerminalSink.java27 import java.util.function.Supplier;
38 interface TerminalSink<T, R> extends Sink<T>, Supplier<R> { }
DCollector.java34 import java.util.function.Supplier;
203 Supplier<A> supplier(); in supplier()
260 public static<T, R> Collector<T, R, R> of(Supplier<R> supplier, in of()
291 public static<T, A, R> Collector<T, A, R> of(Supplier<A> supplier, in of()
DCollectors.java55 import java.util.function.Supplier;
148 private final Supplier<A> supplier;
154 CollectorImpl(Supplier<A> supplier, in CollectorImpl()
166 CollectorImpl(Supplier<A> supplier, in CollectorImpl()
179 public Supplier<A> supplier() { in supplier()
212 Collector<T, ?, C> toCollection(Supplier<C> collectionFactory) { in toCollection()
230 return new CollectorImpl<>((Supplier<List<T>>) ArrayList::new, List::add,
251 return new CollectorImpl<>((Supplier<Set<T>>) HashSet::new, Set::add,
667 private static <T> Supplier<T[]> boxSupplier(T identity) {
902 Supplier<M> mapFactory,
[all …]
DAbstractPipeline.java30 import java.util.function.Supplier;
132 private Supplier<? extends Spliterator<?>> sourceSupplier;
161 AbstractPipeline(Supplier<? extends Spliterator<?>> source, in AbstractPipeline()
358Supplier<Spliterator<E_OUT>> s = (Supplier<Spliterator<E_OUT>>) sourceStage.sourceSupplier; in spliterator()
597 Supplier<Spliterator<P_IN>> supplier, in wrap()
606 …public abstract Spliterator<E_OUT> lazySpliterator(Supplier<? extends Spliterator<E_OUT>> supplier… in lazySpliterator()
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/
DSpliteratorTestHelper.java59 public static void testSpliterator(Supplier<Spliterator<Integer>> supplier) { in testSpliterator()
63 public static void testSpliterator(Supplier<Spliterator<Integer>> supplier, in testSpliterator()
68 public static void testIntSpliterator(Supplier<Spliterator.OfInt> supplier) { in testIntSpliterator()
72 public static void testIntSpliterator(Supplier<Spliterator.OfInt> supplier, in testIntSpliterator()
95 public static void testLongSpliterator(Supplier<Spliterator.OfLong> supplier) { in testLongSpliterator()
99 public static void testLongSpliterator(Supplier<Spliterator.OfLong> supplier, in testLongSpliterator()
122 public static void testDoubleSpliterator(Supplier<Spliterator.OfDouble> supplier) { in testDoubleSpliterator()
126 public static void testDoubleSpliterator(Supplier<Spliterator.OfDouble> supplier, in testDoubleSpliterator()
149 static <T, S extends Spliterator<T>> void testSpliterator(Supplier<S> supplier, in testSpliterator()
172 private static <T, S extends Spliterator<T>> void testNullPointerException(Supplier<S> s) { in testNullPointerException()
[all …]
DTestData.java35 import java.util.function.Supplier;
97 public static <T> OfRef<T> ofSupplier(String name, Supplier<Stream<T>> supplier) { in ofSupplier()
99 Supplier::get, in ofSupplier()
127 public static OfInt ofIntSupplier(String name, Supplier<IntStream> supplier) { in ofIntSupplier()
129 Supplier::get, in ofIntSupplier()
158 public static OfLong ofLongSupplier(String name, Supplier<LongStream> supplier) { in ofLongSupplier()
160 Supplier::get, in ofLongSupplier()
189 public static OfDouble ofDoubleSupplier(String name, Supplier<DoubleStream> supplier) { in ofDoubleSupplier()
191 Supplier::get, in ofDoubleSupplier()
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/
DSpliteratorTestHelper.java59 public static void testSpliterator(Supplier<Spliterator<Integer>> supplier) { in testSpliterator()
63 public static void testSpliterator(Supplier<Spliterator<Integer>> supplier, in testSpliterator()
68 public static void testIntSpliterator(Supplier<Spliterator.OfInt> supplier) { in testIntSpliterator()
72 public static void testIntSpliterator(Supplier<Spliterator.OfInt> supplier, in testIntSpliterator()
95 public static void testLongSpliterator(Supplier<Spliterator.OfLong> supplier) { in testLongSpliterator()
99 public static void testLongSpliterator(Supplier<Spliterator.OfLong> supplier, in testLongSpliterator()
122 public static void testDoubleSpliterator(Supplier<Spliterator.OfDouble> supplier) { in testDoubleSpliterator()
126 public static void testDoubleSpliterator(Supplier<Spliterator.OfDouble> supplier, in testDoubleSpliterator()
149 static <T, S extends Spliterator<T>> void testSpliterator(Supplier<S> supplier, in testSpliterator()
172 private static <T, S extends Spliterator<T>> void testNullPointerException(Supplier<S> s) { in testNullPointerException()
[all …]
DTestData.java35 import java.util.function.Supplier;
96 public static <T> OfRef<T> ofSupplier(String name, Supplier<Stream<T>> supplier) { in ofSupplier()
98 Supplier::get, in ofSupplier()
126 public static OfInt ofIntSupplier(String name, Supplier<IntStream> supplier) { in ofIntSupplier()
128 Supplier::get, in ofIntSupplier()
157 public static OfLong ofLongSupplier(String name, Supplier<LongStream> supplier) { in ofLongSupplier()
159 Supplier::get, in ofLongSupplier()
188 public static OfDouble ofDoubleSupplier(String name, Supplier<DoubleStream> supplier) { in ofDoubleSupplier()
190 Supplier::get, in ofDoubleSupplier()
/libcore/ojluni/src/test/java/util/stream/
DTestDoubleSumAverage.java52 Supplier<DoubleStream> ds = () -> DoubleStream.iterate(0.0, e -> 0.0).limit(10); in testZeroAverageOfNonEmptyStream()
77 Supplier<DoubleStream> ds = () -> DoubleStream.iterate(base, e -> increment).limit(count); in testForCompenstation()
101 Map<Supplier<DoubleStream>, Double> testCases = new LinkedHashMap<>(); in testNonfiniteSum()
124 for(Map.Entry<Supplier<DoubleStream>, Double> testCase : testCases.entrySet()) { in testNonfiniteSum()
125 Supplier<DoubleStream> ds = testCase.getKey(); in testNonfiniteSum()
/libcore/ojluni/annotations/sdk/nullability/java/lang/
DThreadLocal.annotated.java31 import java.util.function.Supplier;
40 …ang.ThreadLocal<S> withInitial(@libcore.util.NonNull java.util.function.Supplier<? extends S> supp… in withInitial()
/libcore/ojluni/src/main/java/java/util/
DOptional.java30 import java.util.function.Supplier;
262 public T orElseGet(Supplier<? extends T> other) { in orElseGet()
282 public <X extends Throwable> T orElseThrow(Supplier<? extends X> exceptionSupplier) throws X { in orElseThrow()
DObjects.java30 import java.util.function.Supplier;
318 public static <T> T requireNonNullElseGet(T obj, Supplier<? extends T> supplier) { in requireNonNullElseGet()
343 public static <T> T requireNonNull(T obj, Supplier<String> messageSupplier) { in requireNonNull()
DOptionalInt.java29 import java.util.function.Supplier;
181 public<X extends Throwable> int orElseThrow(Supplier<X> exceptionSupplier) throws X { in orElseThrow()
DOptionalLong.java29 import java.util.function.Supplier;
181 public<X extends Throwable> long orElseThrow(Supplier<X> exceptionSupplier) throws X { in orElseThrow()
DOptionalDouble.java29 import java.util.function.Supplier;
181 public<X extends Throwable> double orElseThrow(Supplier<X> exceptionSupplier) throws X { in orElseThrow()
/libcore/ojluni/annotations/hiddenapi/java/util/logging/
DLogger.java126 java.util.function.Supplier<java.lang.String> msgSupplier) { in log()
147 java.util.function.Supplier<java.lang.String> msgSupplier) { in log()
163 java.util.function.Supplier<java.lang.String> msgSupplier) { in logp()
199 java.util.function.Supplier<java.lang.String> msgSupplier) { in logp()
334 public void severe(java.util.function.Supplier<java.lang.String> msgSupplier) { in severe()
338 public void warning(java.util.function.Supplier<java.lang.String> msgSupplier) { in warning()
342 public void info(java.util.function.Supplier<java.lang.String> msgSupplier) { in info()
346 public void config(java.util.function.Supplier<java.lang.String> msgSupplier) { in config()
350 public void fine(java.util.function.Supplier<java.lang.String> msgSupplier) { in fine()
354 public void finer(java.util.function.Supplier<java.lang.String> msgSupplier) { in finer()
[all …]
/libcore/ojluni/annotations/sdk/nullability/java/util/logging/
DLogger.annotated.java32 import java.util.function.Supplier;
62 …java.util.logging.Level level, @libcore.util.NonNull java.util.function.Supplier<java.lang.@libcor… in log()
70 …le java.lang.Throwable thrown, @libcore.util.NonNull java.util.function.Supplier<java.lang.@libcor… in log()
74 …java.lang.String sourceMethod, @libcore.util.NonNull java.util.function.Supplier<java.lang.@libcor… in logp()
82 …le java.lang.Throwable thrown, @libcore.util.NonNull java.util.function.Supplier<java.lang.@libcor… in logp()
126 public void severe(@libcore.util.NonNull java.util.function.Supplier<java.lang.@libcore.util.Nullab… in severe()
128 public void warning(@libcore.util.NonNull java.util.function.Supplier<java.lang.@libcore.util.Nulla… in warning()
130 public void info(@libcore.util.NonNull java.util.function.Supplier<java.lang.@libcore.util.Nullable… in info()
132 public void config(@libcore.util.NonNull java.util.function.Supplier<java.lang.@libcore.util.Nullab… in config()
134 public void fine(@libcore.util.NonNull java.util.function.Supplier<java.lang.@libcore.util.Nullable… in fine()
[all …]
/libcore/ojluni/annotations/hiddenapi/java/lang/
DThreadLocal.java46 java.util.function.Supplier<? extends S> supplier) { in withInitial()
97 SuppliedThreadLocal(java.util.function.Supplier<? extends T> supplier) { in SuppliedThreadLocal()
105 private final java.util.function.Supplier<? extends T> supplier;

123