Home
last modified time | relevance | path

Searched refs:findFirst (Results 1 – 13 of 13) sorted by relevance

/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DFindFirstOpTest.java48 assertFalse(Collections.emptySet().stream().findFirst().isPresent(), "no result"); in testFindFirst()
49 assertFalse(countTo(10).stream().filter(x -> x > 10).findFirst().isPresent(), "no result"); in testFindFirst()
51 …exerciseOps(countTo(1000), s -> Arrays.asList(new Integer[]{s.filter(pEven).findFirst().get()}).st… in testFindFirst()
52 …exerciseOps(countTo(1000), s -> Arrays.asList(new Integer[]{s.findFirst().get()}).stream(), Arrays… in testFindFirst()
53 …countTo(1000), s -> Arrays.asList(new Integer[]{s.filter(e -> e == 499).findFirst().get()}).stream… in testFindFirst()
54 …countTo(1000), s -> Arrays.asList(new Integer[]{s.filter(e -> e == 999).findFirst().get()}).stream… in testFindFirst()
55 …exerciseOps(countTo(0), s -> Arrays.asList(new Integer[]{s.findFirst().orElse(-1)}).stream(), Arra… in testFindFirst()
56 …ountTo(1000), s -> Arrays.asList(new Integer[]{s.filter(e -> e == 1499).findFirst().orElse(-1)}).s… in testFindFirst()
68 Optional<Integer> r = exerciseTerminalOps(data, fs, s -> s.findFirst()); in exerciseStream()
88 OptionalInt r = exerciseTerminalOps(data, fs, s -> s.findFirst()); in exerciseIntStream()
[all …]
DSortedOpTest.java63 testStreamTooLarge(f, Stream::findFirst); in testRefStreamTooLarge()
72 testStreamTooLarge(f, IntStream::findFirst); in testIntStreamTooLarge()
81 testStreamTooLarge(f, LongStream::findFirst); in testLongStreamTooLarge()
90 testStreamTooLarge(f, DoubleStream::findFirst); in testDoubleStreamTooLarge()
154 assertEquals(knownSize.apply(1).findFirst(), Optional.of(1)); in testSequentialShortCircuitTerminal()
156 assertEquals(unknownSize.apply(1).findFirst(), Optional.of(1)); in testSequentialShortCircuitTerminal()
231 assertEquals(knownSize.apply(1).findFirst(), OptionalInt.of(1)); in testIntSequentialShortCircuitTerminal()
233 assertEquals(unknownSize.apply(1).findFirst(), OptionalInt.of(1)); in testIntSequentialShortCircuitTerminal()
279 assertEquals(knownSize.apply(1).findFirst(), OptionalLong.of(1)); in testLongSequentialShortCircuitTerminal()
281 assertEquals(unknownSize.apply(1).findFirst(), OptionalLong.of(1)); in testLongSequentialShortCircuitTerminal()
[all …]
DRangeTest.java47 Integer first = Stream.iterate(0, i -> i + 1).filter(i -> i > 10000).findFirst().get(); in testInfiniteRangeFindFirst()
48 …rtEquals(first, Stream.iterate(0, i -> i + 1).parallel().filter(i -> i > 10000).findFirst().get()); in testInfiniteRangeFindFirst()
54 terminal(s->s.findFirst()).expectedResult(Optional.of(10001)).exercise(); in testInfiniteRangeFindFirst()
143 int first = IntStream.iterate(0, i -> i + 1).filter(i -> i > 10000).findFirst().getAsInt(); in testIntInfiniteRangeFindFirst()
144 …(first, IntStream.iterate(0, i -> i + 1).parallel().filter(i -> i > 10000).findFirst().getAsInt()); in testIntInfiniteRangeFindFirst()
226 … long first = LongStream.iterate(0, i -> i + 1).filter(i -> i > 10000).findFirst().getAsLong(); in testLongInfiniteRangeFindFirst()
227 …irst, LongStream.iterate(0, i -> i + 1).parallel().filter(i -> i > 10000).findFirst().getAsLong()); in testLongInfiniteRangeFindFirst()
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/
DStreamReuseTest.java107 Stream::findFirst, Stream::findFirst, in testTwoTerminals()
115 Stream::findFirst, (Stream<Integer> s) -> s.map(i -> i), in testTerminalStream()
119 (Stream<Integer> s) -> s.map(i -> i), Stream::findFirst, in testTerminalStream()
123 Stream::findFirst, Stream::distinct, in testTerminalStream()
127 Stream::distinct, Stream::findFirst, in testTerminalStream()
143 Stream::iterator, Stream::findFirst, in testTerminalIterator()
147 Stream::findFirst, Stream::iterator, in testTerminalIterator()
/libcore/ojluni/src/main/java/java/util/concurrent/
DConcurrentSkipListMap.java1034 final Node<K,V> findFirst() { in findFirst() method in ConcurrentSkipListMap
1063 findFirst(); // retry in doRemoveFirstEntry()
1428 for (Node<K,V> n = findFirst(); n != null; n = n.next) { in writeObject()
1608 for (Node<K,V> n = findFirst(); n != null; n = n.next) { in containsValue()
1634 for (Node<K,V> n = findFirst(); n != null; n = n.next) { in size()
1646 return findFirst() == null; in isEmpty()
2029 Node<K,V> n = findFirst(); in firstKey()
2215 Node<K,V> n = findFirst(); in firstEntry()
2277 while ((next = findFirst()) != null) { in Iter()
2656 return m.findFirst(); in loNode()
[all …]
/libcore/ojluni/src/main/java/java/util/stream/
DDoubleStream.java673 OptionalDouble findFirst(); in findFirst() method
DIntStream.java616 OptionalInt findFirst(); in findFirst() method
DLongStream.java621 OptionalLong findFirst(); in findFirst() method
DStream.java935 Optional<T> findFirst(); in findFirst() method
DDoublePipeline.java511 public final OptionalDouble findFirst() {
DIntPipeline.java508 public final OptionalInt findFirst() {
DLongPipeline.java490 public final OptionalLong findFirst() {
DReferencePipeline.java481 public final Optional<P_OUT> findFirst() {