Searched refs:peek (Results 1 - 25 of 77) sorted by relevance

1234

/libcore/ojluni/src/main/java/java/util/
H A DQueue.java74 * <td>{@link Queue#peek peek()}</td>
107 * <p>The {@link #element()} and {@link #peek()} methods return, but do
194 * differs from {@link #peek peek} only in that it throws an exception
208 E peek(); method in interface:Queue
H A DStack.java33 * method to <tt>peek</tt> at the top item on the stack, a method to test
84 obj = peek();
98 public synchronized E peek() { method in class:Stack
H A DAbstractQueue.java48 * #poll poll}, and {@link #peek peek}, respectively, but throw
55 * Queue#peek}, {@link Queue#poll}, {@link Collection#size}, and
122 * differs from {@link #peek peek} only in that it throws an exception if
125 * <p>This implementation returns the result of {@code peek}
132 E x = peek();
H A DDeque.java130 * <td>{@link java.util.Queue#peek peek()}</td>
131 * <td>{@link #peek peekFirst()}</td>
156 * <td>{@link #peek peek()}</td>
161 * <p>Note that the {@link #peek peek} method works equally well when
457 * This method differs from {@link #peek peek} only in that it throws an
477 E peek(); method in interface:Deque
[all...]
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
H A DTeeOpTest.java60 assertCountSum(countTo(0).stream().peek(copy::add), 0, 0);
64 assertCountSum(countTo(10).stream().peek(copy::add), 10, 55);
68 assertCountSum(countTo(10).stream().map(mDoubler).peek(copy::add), 10, 110);
98 .stream(s -> s.peek(b))
114 .stream(s -> s.peek(b))
130 .stream(s -> s.peek(b))
146 .stream(s -> s.peek(b))
H A DSequentialOpTest.java59 (UnaryOperator<Stream<Integer>>) s -> s.peek(e -> { counter.incrementAndGet(); }),
60 (UnaryOperator<Stream<Integer>>) s -> s.map(id).peek(e -> { counter.incrementAndGet(); }).sequential().map(id),
61 (UnaryOperator<Stream<Integer>>) s -> s.map(id).peek(e -> { counter.incrementAndGet(); }).parallel().map(id),
62 (UnaryOperator<Stream<Integer>>) s -> s.sequential().map(id).peek(e -> {
65 (UnaryOperator<Stream<Integer>>) s -> s.parallel().map(id).peek(e -> { counter.incrementAndGet(); }).map(id)
H A DSortedOpTest.java142 // A peek operation is added in-between the sorted() and terminal
149 l.stream().sorted(), Stream::peek, i);
151 (unknownSizeStream(l).sorted(), Stream::peek, i);
226 Arrays.stream(a).sorted(), (s, c) -> s.peek(c::accept), i);
228 (unknownSizeIntStream(a).sorted(), (s, c) -> s.peek(c::accept), i);
274 Arrays.stream(a).sorted(), (s, c) -> s.peek(c::accept), i);
276 (unknownSizeLongStream(a).sorted(), (s, c) -> s.peek(c::accept), i);
322 Arrays.stream(a).sorted(), (s, c) -> s.peek(c::accept), i);
324 (unknownSizeDoubleStream(a).sorted(), (s, c) -> s.peek(c::accept), i);
/libcore/ojluni/src/main/java/java/util/concurrent/
H A DDelayQueue.java147 if (q.peek() == e) {
193 E first = q.peek();
214 E first = q.peek();
237 if (leader == null && q.peek() != null)
259 E first = q.peek();
288 if (leader == null && q.peek() != null)
304 public E peek() { method in class:DelayQueue
308 return q.peek();
330 E first = q.peek();
H A DBlockingDeque.java187 * <td>{@link #peek() peek()}</td>
570 * This method differs from {@link #peek peek} only in that it throws an
589 E peek(); method in interface:BlockingDeque
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
H A DStackTest.java51 * java.util.Stack#peek()
54 // Test for method java.lang.Object java.util.Stack.peek()
60 .peek() == item1);
64 .peek() == item3);
69 s.peek());
H A DArrayDequeTest.java110 assertEquals(testObjOne, testQue.peek());
113 assertEquals(testObjOne, testQue.peek());
116 assertEquals(testObjTwo, testQue.peek());
132 assertEquals(testObjOne, testQue.peek());
135 assertEquals(testObjOne, testQue.peek());
138 assertEquals(testObjOne, testQue.peek());
154 assertEquals(testObjOne, testQue.peek());
157 assertEquals(testObjOne, testQue.peek());
160 assertEquals(testObjTwo, testQue.peek());
176 assertEquals(testObjOne, testQue.peek());
[all...]
H A DAbstractQueueTest.java99 public E peek() { method in class:AbstractQueueTest.MockAbstractQueue
236 assertNull(queue.peek());
247 assertNull(queue.peek());
H A DLinkedListTest.java349 * {@link java.util.LinkedList#peek()}
354 assertNull("Should return null if this list is empty", list.peek());
356 assertEquals("Returned incorrect first element", ll.peek(), objArray[0]);
760 assertEquals(testObjOne, testList.peek());
763 assertEquals(testObjOne, testList.peek());
766 assertEquals(testObjTwo, testList.peek());
778 assertEquals(testObjOne, testList.peek());
781 assertEquals(testObjOne, testList.peek());
784 assertEquals(testObjOne, testList.peek());
796 assertEquals(testObjOne, testList.peek());
[all...]
/libcore/ojluni/src/main/java/sun/security/util/
H A DDerInputBuffer.java86 int peek() throws IOException { method in class:DerInputBuffer
365 int peek = pos;
366 while (buf[peek] != 'Z' &&
367 buf[peek] != '+' &&
368 buf[peek] != '-') {
369 peek++;
/libcore/jsr166-tests/src/test/java/jsr166/
H A DAbstractQueueTest.java35 public Integer peek() { return one; } method in class:AbstractQueueTest.Succeed
46 public Integer peek() { return null; } method in class:AbstractQueueTest.Fail
102 * element returns normally if peek succeeds
110 * element throws NSEE if peek returns null
H A DConcurrentLinkedQueueTest.java245 * peek returns next element, or null if empty
250 assertEquals(i, q.peek());
252 assertTrue(q.peek() == null ||
253 !q.peek().equals(i));
255 assertNull(q.peek());
H A DPriorityQueueTest.java279 * peek returns next element, or null if empty
284 assertEquals(i, q.peek());
286 assertTrue(q.peek() == null ||
287 !q.peek().equals(i));
289 assertNull(q.peek());
/libcore/json/src/main/java/org/json/
H A DJSONStringer.java189 Scope context = peek();
205 private Scope peek() throws JSONException { method in class:JSONStringer
384 Scope context = peek();
404 Scope context = peek();
/libcore/support/src/test/java/tests/http/
H A DMockWebServer.java222 MockResponse peek = responseQueue.peek();
223 if (peek != null && peek.getSocketPolicy() == DISCONNECT_AT_START) {
293 MockResponse connect = responseQueue.peek();
413 return responseQueue.peek();
/libcore/benchmarks/src/benchmarks/regression/
H A DParseBenchmark.java151 switch (reader.peek()) {
171 throw new IllegalArgumentException("Unexpected token" + reader.peek());
/libcore/support/src/test/java/tests/util/
H A DCallVerificationStack.java96 return this.callStack.peek().getClassName();
105 return this.callStack.peek().getMethodName();
/libcore/ojluni/src/main/java/java/util/jar/
H A DManifest.java227 if (fis.peek() == ' ') {
238 if (fis.peek() == ' ') {
400 public byte peek() throws IOException { method in class:Manifest.FastInputStream
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
H A DDatagramSocketImplTest.java118 protected int peek(InetAddress sender) throws IOException { method in class:MockDatagramSocketImpl
/libcore/ojluni/src/main/java/java/net/
H A DDatagramSocketImpl.java133 protected abstract int peek(InetAddress i) throws IOException; method in class:DatagramSocketImpl
/libcore/ojluni/src/main/java/java/nio/file/
H A DFileTreeWalker.java334 DirectoryNode top = stack.peek();
402 stack.peek().skip();

Completed in 1041 milliseconds

1234