/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | TeeOpTest.java | 55 assertCountSum(countTo(0).stream().peek(copy::add), 0, 0); in testTee() 59 assertCountSum(countTo(10).stream().peek(copy::add), 10, 55); in testTee() 63 assertCountSum(countTo(10).stream().map(mDoubler).peek(copy::add), 10, 110); in testTee() 93 .stream(s -> s.peek(b)) in testOps() 109 .stream(s -> s.peek(b)) in testIntOps() 125 .stream(s -> s.peek(b)) in testLongOps() 141 .stream(s -> s.peek(b)) in testDoubleOps()
|
D | CountTest.java | 198 assertEquals(supplier.get().peek(e -> ai.getAndIncrement()).count(), expectedCount); in checkStreamDoesNotConsumeElements() 201 … assertEquals(supplier.get().peek(e -> ai.getAndIncrement()).parallel().count(), expectedCount); in checkStreamDoesNotConsumeElements() 207 assertEquals(supplier.get().peek(e -> ai.getAndIncrement()).count(), expectedCount); in checkIntStreamDoesNotConsumeElements() 210 … assertEquals(supplier.get().peek(e -> ai.getAndIncrement()).parallel().count(), expectedCount); in checkIntStreamDoesNotConsumeElements() 216 assertEquals(supplier.get().peek(e -> ai.getAndIncrement()).count(), expectedCount); in checkLongStreamDoesNotConsumeElements() 219 … assertEquals(supplier.get().peek(e -> ai.getAndIncrement()).parallel().count(), expectedCount); in checkLongStreamDoesNotConsumeElements() 225 assertEquals(supplier.get().peek(e -> ai.getAndIncrement()).count(), expectedCount); in checkDoubleStreamDoesNotConsumeElements() 228 … assertEquals(supplier.get().peek(e -> ai.getAndIncrement()).parallel().count(), expectedCount); in checkDoubleStreamDoesNotConsumeElements()
|
D | FlatMapOpTest.java | 89 return Stream.of(1, 2).peek(e -> before.getAndIncrement()); in testClose() 110 IntStream.of(1, 2).peek(e -> before.getAndIncrement()). in testIntClose() 120 LongStream.of(1, 2).peek(e -> before.getAndIncrement()). in testLongClose() 130 DoubleStream.of(1, 2).peek(e -> before.getAndIncrement()). in testDoubleClose() 158 peek(i -> count.incrementAndGet()). in testOpsShortCircuit() 192 peek(i -> count.incrementAndGet()). in testIntOpsShortCircuit() 198 peek(i -> count.incrementAndGet()). in testIntOpsShortCircuit() 229 peek(i -> count.incrementAndGet()). in testLongOpsShortCircuit() 235 peek(i -> count.incrementAndGet()). in testLongOpsShortCircuit() 266 peek(i -> count.incrementAndGet()). in testDoubleOpsShortCircuit() [all …]
|
D | SequentialOpTest.java | 59 … (UnaryOperator<Stream<Integer>>) s -> s.peek(e -> { counter.incrementAndGet(); }), in testLazy() 60 …(UnaryOperator<Stream<Integer>>) s -> s.map(id).peek(e -> { counter.incrementAndGet(); }).sequenti… in testLazy() 61 …(UnaryOperator<Stream<Integer>>) s -> s.map(id).peek(e -> { counter.incrementAndGet(); }).parallel… in testLazy() 62 (UnaryOperator<Stream<Integer>>) s -> s.sequential().map(id).peek(e -> { in testLazy() 65 …(UnaryOperator<Stream<Integer>>) s -> s.parallel().map(id).peek(e -> { counter.incrementAndGet(); … in testLazy()
|
D | SortedOpTest.java | 152 l.stream().sorted(), Stream::peek, i); in testSequentialShortCircuitTerminal() 154 (unknownSizeStream(l).sorted(), Stream::peek, i); in testSequentialShortCircuitTerminal() 229 Arrays.stream(a).sorted(), (s, c) -> s.peek(c::accept), i); in testIntSequentialShortCircuitTerminal() 231 (unknownSizeIntStream(a).sorted(), (s, c) -> s.peek(c::accept), i); in testIntSequentialShortCircuitTerminal() 277 Arrays.stream(a).sorted(), (s, c) -> s.peek(c::accept), i); in testLongSequentialShortCircuitTerminal() 279 (unknownSizeLongStream(a).sorted(), (s, c) -> s.peek(c::accept), i); in testLongSequentialShortCircuitTerminal() 325 Arrays.stream(a).sorted(), (s, c) -> s.peek(c::accept), i); in testDoubleSequentialShortCircuitTerminal() 327 (unknownSizeDoubleStream(a).sorted(), (s, c) -> s.peek(c::accept), i); in testDoubleSequentialShortCircuitTerminal()
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | DelayQueue.java | 148 if (q.peek() == e) { in offer() 194 E first = q.peek(); in poll() 215 E first = q.peek(); in take() 238 if (leader == null && q.peek() != null) in take() 260 E first = q.peek(); in poll() 289 if (leader == null && q.peek() != null) in poll() 305 public E peek() { in peek() method in DelayQueue 309 return q.peek(); in peek() 353 && (first = q.peek()) != null in drainTo()
|
/libcore/ojluni/src/main/java/java/util/ |
D | Stack.java | 83 obj = peek(); in pop() 97 public synchronized E peek() { in peek() method in Stack
|
D | Queue.java | 211 E peek(); in peek() method
|
D | AbstractQueue.java | 132 E x = peek(); in element()
|
D | Deque.java | 488 E peek(); in peek() method
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | ArrayDequeTest.java | 113 assertEquals(testObjOne, testQue.peek()); in test_addFirst() 116 assertEquals(testObjOne, testQue.peek()); in test_addFirst() 119 assertEquals(testObjTwo, testQue.peek()); in test_addFirst() 135 assertEquals(testObjOne, testQue.peek()); in test_addLast() 138 assertEquals(testObjOne, testQue.peek()); in test_addLast() 141 assertEquals(testObjOne, testQue.peek()); in test_addLast() 157 assertEquals(testObjOne, testQue.peek()); in test_offerFirst() 160 assertEquals(testObjOne, testQue.peek()); in test_offerFirst() 163 assertEquals(testObjTwo, testQue.peek()); in test_offerFirst() 179 assertEquals(testObjOne, testQue.peek()); in test_offerLast() [all …]
|
D | StackTest.java | 60 .peek() == item1); in test_peek() 64 .peek() == item3); in test_peek() 69 s.peek()); in test_peek()
|
D | AbstractQueueTest.java | 99 public E peek() { in peek() method in AbstractQueueTest 236 assertNull(queue.peek()); in test_clear_empty() 247 assertNull(queue.peek()); in test_clear()
|
D | LinkedListTest.java | 354 assertNull("Should return null if this list is empty", list.peek()); in test_peek() 356 assertEquals("Returned incorrect first element", ll.peek(), objArray[0]); in test_peek() 760 assertEquals(testObjOne, testList.peek()); in test_offerFirst() 763 assertEquals(testObjOne, testList.peek()); in test_offerFirst() 766 assertEquals(testObjTwo, testList.peek()); in test_offerFirst() 778 assertEquals(testObjOne, testList.peek()); in test_offerLast() 781 assertEquals(testObjOne, testList.peek()); in test_offerLast() 784 assertEquals(testObjOne, testList.peek()); in test_offerLast() 796 assertEquals(testObjOne, testList.peek()); in test_push() 799 assertEquals(testObjOne, testList.peek()); in test_push() [all …]
|
/libcore/ojluni/src/main/java/sun/security/util/ |
D | DerInputBuffer.java | 86 int peek() throws IOException { in peek() method in DerInputBuffer 365 int peek = pos; in getTime() local 366 while (buf[peek] != 'Z' && in getTime() 367 buf[peek] != '+' && in getTime() 368 buf[peek] != '-') { in getTime() 369 peek++; in getTime()
|
/libcore/json/src/main/java/org/json/ |
D | JSONStringer.java | 196 Scope context = peek(); in close() 213 private Scope peek() throws JSONException { in peek() method in JSONStringer 396 Scope context = peek(); in beforeKey() 417 Scope context = peek(); in beforeValue()
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | AbstractQueueTest.java | 58 public Integer peek() { return one; } in peek() method in AbstractQueueTest.Succeed 69 public Integer peek() { return null; } in peek() method in AbstractQueueTest.Fail
|
D | ConcurrentLinkedQueueTest.java | 76 assertEquals((Integer) 0, q.peek()); in populatedQueue() 283 assertEquals(i, q.peek()); in testPeek() 285 assertTrue(q.peek() == null || in testPeek() 286 !q.peek().equals(i)); in testPeek() 288 assertNull(q.peek()); in testPeek()
|
D | PriorityQueueTest.java | 88 assertEquals((Integer) 0, q.peek()); in populatedQueue() 330 assertEquals(i, q.peek()); 332 assertTrue(q.peek() == null || 333 !q.peek().equals(i)); 335 assertNull(q.peek());
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | AbstractQueueTest.java | 35 public Integer peek() { return one; } in peek() method in AbstractQueueTest.Succeed 46 public Integer peek() { return null; } in peek() method in AbstractQueueTest.Fail
|
/libcore/ojluni/src/test/java/util/SequencedCollection/ |
D | SimpleDeque.java | 187 public E peek() { in peek() method in SimpleDeque 188 return deque.peek(); in peek()
|
/libcore/ojluni/src/test/java/util/Collections/ |
D | AsLifoQueue.java | 64 equal(q.peek(), "c"); in realMain() 68 equal(q.peek(), "a"); in realMain()
|
/libcore/ojluni/annotations/sdk/nullability/java/util/ |
D | Queue.annotated.java | 53 @libcore.util.Nullable public E peek(); in peek() method
|
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/ |
D | DefaultMethodStreams.java | 247 public Stream<T> peek(Consumer<? super T> action) { in peek() method in DefaultMethodStreams.DefaultMethodRefStream 248 return s.peek(action); in peek() 438 public IntStream peek(IntConsumer action) { in peek() method in DefaultMethodStreams.DefaultMethodIntStream 439 return s.peek(action); in peek() 649 public LongStream peek(LongConsumer action) { in peek() method in DefaultMethodStreams.DefaultMethodLongStream 650 return s.peek(action); in peek() 842 public DoubleStream peek(DoubleConsumer action) { in peek() method in DefaultMethodStreams.DefaultMethodDoubleStream 843 return s.peek(action); in peek()
|
/libcore/ojluni/src/test/java/util/regex/ |
D | PatternStreamTest.java | 229 m.results().peek(mr -> m.reset()).count(); in testFailfastMatchResults() 237 m.results().peek(mr -> m.find()).count(); in testFailfastMatchResults() 247 m.results().peek(mr -> m.reset()).limit(2).count(); in testFailfastMatchResults() 255 m.results().peek(mr -> m.find()).limit(2).count(); in testFailfastMatchResults()
|