Searched refs:offer (Results 1 - 25 of 44) sorted by relevance

12

/libcore/ojluni/src/main/java/java/util/
H A DQueue.java64 * <td>{@link Queue#offer offer(e)}</td>
90 * <p>The {@link #offer offer} method inserts an element if possible,
94 * {@code offer} method is designed for use when failure is a normal,
172 boolean offer(E e); method in interface:Queue
H A DAbstractQueue.java47 * {@link #element element} are based on {@link #offer offer}, {@link
53 * minimally define a method {@link Queue#offer} which does not permit
80 * <p>This implementation returns {@code true} if {@code offer} succeeds,
95 if (offer(e))
H A DDeque.java114 * <td>{@link java.util.Queue#offer offer(e)}</td>
389 * use {@link #offer(Object) offer}.
427 boolean offer(E e); method in interface:Deque
H A DPriorityQueue.java69 * ({@code offer}, {@code poll}, {@code remove()} and {@code add});
321 return offer(e);
327 * @return {@code true} (as specified by {@link Queue#offer})
333 public boolean offer(E e) { method in class:PriorityQueue
/libcore/ojluni/src/main/java/java/util/concurrent/
H A DBlockingQueue.java73 * <td>{@link #offer offer(e)}</td>
75 * <td>{@link #offer(Object, long, TimeUnit) offer(e, time, unit)}</td>
95 * to {@code add}, {@code put} or {@code offer} a {@code null}. A
188 * use {@link #offer(Object) offer}.
219 boolean offer(E e); method in interface:BlockingQueue
253 boolean offer(E e, long timeout, TimeUnit unit) method in interface:BlockingQueue
H A DBlockingDeque.java149 * <td>{@link #offer(Object) offer(e)}</td>
157 * <td>{@link #offer(Object, long, TimeUnit) offer(e, time, unit)}</td>
444 * use {@link #offer(Object) offer}.
476 boolean offer(E e); method in interface:BlockingDeque
513 boolean offer(E e, long timeout, TimeUnit unit) method in interface:BlockingDeque
H A DDelayQueue.java132 return offer(e);
142 public boolean offer(E e) { method in class:DelayQueue
146 q.offer(e);
165 offer(e);
178 public boolean offer(E e, long timeout, TimeUnit unit) { method in class:DelayQueue
179 return offer(e);
H A DPriorityBlockingQueue.java462 return offer(e);
470 * @return {@code true} (as specified by {@link Queue#offer})
476 public boolean offer(E e) { method in class:PriorityBlockingQueue
510 offer(e); // never need to block
522 * {@link BlockingQueue#offer(Object,long,TimeUnit) BlockingQueue.offer})
528 public boolean offer(E e, long timeout, TimeUnit unit) { method in class:PriorityBlockingQueue
529 return offer(e); // never need to block
H A DScheduledThreadPoolExecutor.java1045 public boolean offer(Runnable x) { method in class:ScheduledThreadPoolExecutor.DelayedWorkQueue
1073 offer(e);
1077 return offer(e);
1080 public boolean offer(Runnable e, long timeout, TimeUnit unit) { method in class:ScheduledThreadPoolExecutor.DelayedWorkQueue
1081 return offer(e);
/libcore/ojluni/src/main/java/sun/nio/fs/
H A DAbstractWatchService.java72 pendingKeys.offer(key);
158 pendingKeys.offer(CLOSE_KEY);
/libcore/ojluni/src/main/java/sun/nio/ch/
H A DEPollPort.java106 // create the queue and offer the special event to ensure that the first
109 this.queue.offer(NEED_TO_POLL);
217 queue.offer(EXECUTE_TASK_OR_SHUTDOWN);
231 queue.offer(ev);
244 queue.offer(NEED_TO_POLL);
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
H A DPriorityQueueTest.java48 integerQueue.offer(array[i]);
89 integerQueue.offer(0);
117 integerQueue.offer(array[i]);
145 integerQueue.offer(array[i]);
160 integerQueue.offer(array[i]);
189 integerQueue.offer(array[i]);
321 queue.offer(array[i]);
359 integerQueue.offer(array[i]);
413 * java.util.PriorityQueue#offer(Object)
420 queue.offer(arra
[all...]
/libcore/jsr166-tests/src/test/java/jsr166/
H A DAbstractQueueTest.java31 public boolean offer(Integer x) { method in class:AbstractQueueTest.Succeed
42 public boolean offer(Integer x) { method in class:AbstractQueueTest.Fail
53 * add returns true if offer succeeds
61 * add throws ISE true if offer fails
72 * add throws NPE if offer does
H A DPriorityQueueTest.java47 assertTrue(q.offer(new Integer(i)));
49 assertTrue(q.offer(new Integer(i)));
162 * offer(null) throws NPE
167 q.offer(null);
188 assertTrue(q.offer(zero));
189 assertTrue(q.offer(one));
198 q.offer(new Object());
199 q.offer(new Object());
H A DPriorityBlockingQueueTest.java73 assertTrue(q.offer(new Integer(i)));
75 assertTrue(q.offer(new Integer(i)));
199 assertTrue(q.offer(zero));
200 assertTrue(q.offer(one));
209 q.offer(new Object());
210 q.offer(new Object());
298 * timed offer does not time out
306 assertTrue(q.offer(new Integer(0), SHORT_DELAY_MS, MILLISECONDS));
307 assertTrue(q.offer(new Integer(0), LONG_DELAY_MS, MILLISECONDS));
717 assertTrue(q.offer(ne
[all...]
H A DSynchronousQueueTest.java65 assertFalse(q.offer(zero));
69 * offer fails if no active taker
75 assertFalse(q.offer(one));
189 * timed offer times out if elements not taken
199 assertFalse(q.offer(new Object(), timeoutMillis(), MILLISECONDS));
203 q.offer(new Object(), 2 * LONG_DELAY_MS, MILLISECONDS);
249 * timed poll before a delayed offer times out, returning null;
250 * after offer succeeds; on interruption throws
287 try { assertTrue(q.offer(zero, LONG_DELAY_MS, MILLISECONDS)); }
474 * offer transfer
[all...]
H A DBlockingQueueTest.java67 * offer(null) throws NullPointerException
72 q.offer(null);
89 * timed offer(null) throws NullPointerException
95 q.offer(null, LONG_DELAY_MS, MILLISECONDS);
212 * timed poll before a delayed offer times out; after offer succeeds;
248 assertTrue(q.offer(zero, LONG_DELAY_MS, MILLISECONDS));
H A DArrayBlockingQueueTest.java64 assertTrue(q.offer(new Integer(i)));
162 assertFalse(q.offer(three));
187 assertTrue(q.offer(zero));
188 assertFalse(q.offer(one));
345 * timed offer times out if full and elements not taken
355 assertFalse(q.offer(new Object(), timeoutMillis(), MILLISECONDS));
359 q.offer(new Object(), 2 * LONG_DELAY_MS, MILLISECONDS);
790 * offer transfers elements across Executor tasks
801 assertFalse(q.offer(three));
803 assertTrue(q.offer(thre
[all...]
H A DConcurrentLinkedQueueTest.java41 assertTrue(q.offer(new Integer(i)));
129 * offer(null) throws NPE
134 q.offer(null);
155 assertTrue(q.offer(zero));
156 assertTrue(q.offer(one));
H A DLinkedBlockingQueueTest.java65 assertTrue(q.offer(new Integer(i)));
151 assertFalse(q.offer(three));
176 assertTrue(q.offer(zero));
177 assertFalse(q.offer(one));
335 * timed offer times out if full and elements not taken
345 assertFalse(q.offer(new Object(), timeoutMillis(), MILLISECONDS));
349 q.offer(new Object(), 2 * LONG_DELAY_MS, MILLISECONDS);
724 * offer transfers elements across Executor tasks
735 assertFalse(q.offer(three));
737 assertTrue(q.offer(thre
[all...]
H A DLinkedTransferQueueTest.java599 * offer transfers elements across Executor tasks
611 assertTrue(q.offer(one, LONG_DELAY_MS, MILLISECONDS));
720 assertTrue(q.offer(j));
735 * offer(e) decrements the waiting consumer count
760 assertTrue(q.offer(one));
856 assertTrue(q.offer(three));
1011 assertTrue(q.offer(four));
1036 assertTrue(q.offer(four));
1052 assertTrue(q.offer(i));
H A DLinkedListTest.java39 assertTrue(q.offer(new Integer(i)));
104 * offer(null) succeeds
108 q.offer(null);
118 assertTrue(q.offer(new Integer(0)));
119 assertTrue(q.offer(new Integer(1)));
H A DDelayQueueTest.java143 assertTrue(q.offer(new PDelay(i)));
145 assertTrue(q.offer(new PDelay(i)));
237 * offer non-null succeeds
241 assertTrue(q.offer(new PDelay(0)));
242 assertTrue(q.offer(new PDelay(1)));
328 * timed offer does not time out
336 assertTrue(q.offer(new PDelay(0), SHORT_DELAY_MS, MILLISECONDS));
337 assertTrue(q.offer(new PDelay(0), LONG_DELAY_MS, MILLISECONDS));
H A DLinkedBlockingDequeTest.java62 assertTrue(q.offer(new Integer(i)));
407 assertFalse(q.offer(three));
484 assertTrue(q.offer(zero));
485 assertFalse(q.offer(one));
643 * timed offer times out if full and elements not taken
653 assertFalse(q.offer(new Object(), timeoutMillis(), MILLISECONDS));
657 q.offer(new Object(), 2 * LONG_DELAY_MS, MILLISECONDS);
1678 * offer transfers elements across Executor tasks
1689 assertFalse(q.offer(three));
1691 assertTrue(q.offer(thre
[all...]
/libcore/luni/src/test/java/libcore/java/util/
H A DOldPriorityQueueTest.java46 queue.offer(array[i]);

Completed in 340 milliseconds

12