Home
last modified time | relevance | path

Searched refs:findAny (Results 1 – 11 of 11) sorted by relevance

/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DFindAnyOpTest.java55 assertFalse(Collections.emptySet().stream().findAny().isPresent(), "no result"); in testFindAny()
56 assertFalse(countTo(10).stream().filter(x -> x > 10).findAny().isPresent(), "no result"); in testFindAny()
57 assertTrue(countTo(10).stream().filter(pEven).findAny().isPresent(), "with result"); in testFindAny()
61 assertFalse(Collections.emptySet().parallelStream().findAny().isPresent(), "no result"); in testFindAnyParallel()
62 …assertFalse(countTo(1000).parallelStream().filter(x -> x > 1000).findAny().isPresent(), "no result… in testFindAnyParallel()
63 … assertTrue(countTo(1000).parallelStream().filter(pEven).findAny().isPresent(), "with result"); in testFindAnyParallel()
75 …Optional<Integer> or = withData(data).terminal(fs, s -> s.findAny()).equalator(VALID_ANSWER).exerc… in exerciseStream()
99 …OptionalInt or = withData(data).terminal(fs, s -> s.findAny()).equalator(INT_VALID_ANSWER).exercis… in exerciseIntStream()
123 …OptionalLong or = withData(data).terminal(fs, s -> s.findAny()).equalator(LONG_VALID_ANSWER).exerc… in exerciseLongStream()
147 …OptionalDouble or = withData(data).terminal(fs, s -> s.findAny()).equalator(DOUBLE_VALID_ANSWER).e… in exerciseDoubleStream()
DSortedOpTest.java155 assertEquals(knownSize.apply(1).findAny(), Optional.of(1)); in testSequentialShortCircuitTerminal()
157 assertEquals(unknownSize.apply(1).findAny(), Optional.of(1)); in testSequentialShortCircuitTerminal()
232 assertEquals(knownSize.apply(1).findAny(), OptionalInt.of(1)); in testIntSequentialShortCircuitTerminal()
234 assertEquals(unknownSize.apply(1).findAny(), OptionalInt.of(1)); in testIntSequentialShortCircuitTerminal()
280 assertEquals(knownSize.apply(1).findAny(), OptionalLong.of(1)); in testLongSequentialShortCircuitTerminal()
282 assertEquals(unknownSize.apply(1).findAny(), OptionalLong.of(1)); in testLongSequentialShortCircuitTerminal()
328 assertEquals(knownSize.apply(1).findAny(), OptionalDouble.of(1)); in testDoubleSequentialShortCircuitTerminal()
330 assertEquals(unknownSize.apply(1).findAny(), OptionalDouble.of(1)); in testDoubleSequentialShortCircuitTerminal()
DDistinctOpTest.java72 … Optional<Integer> oi = Stream.iterate(1, i -> i + 1).unordered().parallel().distinct().findAny(); in testWithUnorderedInfiniteStream()
75 oi = ThreadLocalRandom.current().ints().boxed().parallel().distinct().findAny(); in testWithUnorderedInfiniteStream()
/libcore/ojluni/src/main/java/java/util/stream/
DDoubleStream.java690 OptionalDouble findAny(); in findAny() method
DIntStream.java635 OptionalInt findAny(); in findAny() method
DLongStream.java639 OptionalLong findAny(); in findAny() method
DStream.java952 Optional<T> findAny(); in findAny() method
DDoublePipeline.java501 public final OptionalDouble findAny() {
DLongPipeline.java479 public final OptionalLong findAny() {
DIntPipeline.java497 public final OptionalInt findAny() {
DReferencePipeline.java470 public final Optional<P_OUT> findAny() {