Home
last modified time | relevance | path

Searched refs:peek (Results 1 – 25 of 87) sorted by relevance

1234

/libcore/ojluni/src/main/java/java/util/concurrent/
DDelayQueue.java147 if (q.peek() == e) { in offer()
193 E first = q.peek(); in poll()
214 E first = q.peek(); in take()
237 if (leader == null && q.peek() != null) in take()
259 E first = q.peek(); in poll()
288 if (leader == null && q.peek() != null) in poll()
304 public E peek() { in peek() method in DelayQueue
308 return q.peek(); in peek()
330 E first = q.peek(); in peekExpired()
DBlockingDeque.java589 E peek(); in peek() method
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DTeeOpTest.java60 assertCountSum(countTo(0).stream().peek(copy::add), 0, 0); in testTee()
64 assertCountSum(countTo(10).stream().peek(copy::add), 10, 55); in testTee()
68 assertCountSum(countTo(10).stream().map(mDoubler).peek(copy::add), 10, 110); in testTee()
98 .stream(s -> s.peek(b)) in testOps()
114 .stream(s -> s.peek(b)) in testIntOps()
130 .stream(s -> s.peek(b)) in testLongOps()
146 .stream(s -> s.peek(b)) in testDoubleOps()
DSequentialOpTest.java59 … (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()
DSortedOpTest.java149 l.stream().sorted(), Stream::peek, i); in testSequentialShortCircuitTerminal()
151 (unknownSizeStream(l).sorted(), Stream::peek, i); in testSequentialShortCircuitTerminal()
226 Arrays.stream(a).sorted(), (s, c) -> s.peek(c::accept), i); in testIntSequentialShortCircuitTerminal()
228 (unknownSizeIntStream(a).sorted(), (s, c) -> s.peek(c::accept), i); in testIntSequentialShortCircuitTerminal()
274 Arrays.stream(a).sorted(), (s, c) -> s.peek(c::accept), i); in testLongSequentialShortCircuitTerminal()
276 (unknownSizeLongStream(a).sorted(), (s, c) -> s.peek(c::accept), i); in testLongSequentialShortCircuitTerminal()
322 Arrays.stream(a).sorted(), (s, c) -> s.peek(c::accept), i); in testDoubleSequentialShortCircuitTerminal()
324 (unknownSizeDoubleStream(a).sorted(), (s, c) -> s.peek(c::accept), i); in testDoubleSequentialShortCircuitTerminal()
/libcore/ojluni/src/main/java/java/util/
DStack.java84 obj = peek(); in pop()
98 public synchronized E peek() { in peek() method in Stack
DQueue.java208 E peek(); in peek() method
DAbstractQueue.java132 E x = peek(); in element()
DDeque.java478 E peek(); in peek() method
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DArrayDequeTest.java110 assertEquals(testObjOne, testQue.peek()); in test_addFirst()
113 assertEquals(testObjOne, testQue.peek()); in test_addFirst()
116 assertEquals(testObjTwo, testQue.peek()); in test_addFirst()
132 assertEquals(testObjOne, testQue.peek()); in test_addLast()
135 assertEquals(testObjOne, testQue.peek()); in test_addLast()
138 assertEquals(testObjOne, testQue.peek()); in test_addLast()
154 assertEquals(testObjOne, testQue.peek()); in test_offerFirst()
157 assertEquals(testObjOne, testQue.peek()); in test_offerFirst()
160 assertEquals(testObjTwo, testQue.peek()); in test_offerFirst()
176 assertEquals(testObjOne, testQue.peek()); in test_offerLast()
[all …]
DStackTest.java60 .peek() == item1); in test_peek()
64 .peek() == item3); in test_peek()
69 s.peek()); in test_peek()
DAbstractQueueTest.java99 public E peek() { in peek() method in AbstractQueueTest
236 assertNull(queue.peek()); in test_clear_empty()
247 assertNull(queue.peek()); in test_clear()
DLinkedListTest.java354 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 …]
DPriorityQueueTest.java502 assertEquals(new Integer(array[0]), integerQueue.peek()); in test_peek()
503 assertEquals(new Integer(array[0]), integerQueue.peek()); in test_peek()
512 assertNull(queue.peek()); in test_peek_empty()
513 assertNull(queue.peek()); in test_peek_empty()
699 Object o = destStringQueue.peek(); in test_Serialization_casting()
717 Object o = destStringQueue.peek(); in test_SerializationCompatibility_cast()
/libcore/ojluni/src/main/java/sun/security/util/
DDerInputBuffer.java86 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/
DJSONStringer.java196 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()
DJSONTokener.java135 char peek = in.charAt(pos); in nextCleanInternal() local
136 switch (peek) { in nextCleanInternal()
/libcore/jsr166-tests/src/test/java/jsr166/
DAbstractQueueTest.java35 public Integer peek() { return one; } in peek() method in AbstractQueueTest.Succeed
46 public Integer peek() { return null; } in peek() method in AbstractQueueTest.Fail
DPriorityQueueTest.java284 assertEquals(i, q.peek()); in testPeek()
286 assertTrue(q.peek() == null || in testPeek()
287 !q.peek().equals(i)); in testPeek()
289 assertNull(q.peek()); in testPeek()
DLinkedListTest.java204 assertEquals(i, q.peek()); in testPeek()
206 assertTrue(q.peek() == null || in testPeek()
207 !q.peek().equals(i)); in testPeek()
209 assertNull(q.peek()); in testPeek()
505 assertSame(four, q.peek()); in testAddFirst()
DConcurrentLinkedQueueTest.java250 assertEquals(i, q.peek()); in testPeek()
252 assertTrue(q.peek() == null || in testPeek()
253 !q.peek().equals(i)); in testPeek()
255 assertNull(q.peek()); in testPeek()
DDelayQueueTest.java468 assertEquals(new PDelay(i), q.peek()); in testPeek()
471 assertNull(q.peek()); in testPeek()
473 assertFalse(new PDelay(i).equals(q.peek())); in testPeek()
475 assertNull(q.peek()); in testPeek()
719 assertNotNull(q.peek()); in testPeekDelayed()
/libcore/ojluni/annotations/sdk/nullability/java/util/
DQueue.annotated.java53 @libcore.util.Nullable public E peek(); in peek() method
/libcore/ojluni/src/main/java/java/util/jar/
DManifest.java227 if (fis.peek() == ' ') { in read()
238 if (fis.peek() == ' ') { in read()
400 public byte peek() throws IOException { in peek() method in Manifest.FastInputStream
/libcore/ojluni/src/main/java/java/nio/file/
DFileTreeWalker.java334 DirectoryNode top = stack.peek(); in next()
402 stack.peek().skip(); in skipRemainingSiblings()

1234