146 |
|
|
147 |
|
|
148 |
|
/** |
149 |
< |
* Create a <tt>LinkedBlockingQueue</tt> with a capacity of |
149 |
> |
* Creates a <tt>LinkedBlockingQueue</tt> with a capacity of |
150 |
|
* {@link Integer#MAX_VALUE}. |
151 |
|
*/ |
152 |
|
public LinkedBlockingQueue() { |
154 |
|
} |
155 |
|
|
156 |
|
/** |
157 |
< |
* Create a <tt>LinkedBlockingQueue</tt> with the given (fixed) capacity |
157 |
> |
* Creates a <tt>LinkedBlockingQueue</tt> with the given (fixed) capacity |
158 |
|
* @param capacity the capacity of this queue. |
159 |
|
* @throws IllegalArgumentException if <tt>capacity</tt> is not greater |
160 |
|
* than zero. |
166 |
|
} |
167 |
|
|
168 |
|
/** |
169 |
< |
* Create a <tt>LinkedBlockingQueue</tt> with a capacity of |
169 |
> |
* Creates a <tt>LinkedBlockingQueue</tt> with a capacity of |
170 |
|
* {@link Integer#MAX_VALUE}, initially holding the elements of the |
171 |
|
* given collection, |
172 |
|
* added in traversal order of the collection's iterator. |
203 |
|
// this doc comment is overridden to remove the reference to collections |
204 |
|
// greater in size than Integer.MAX_VALUE |
205 |
|
/** |
206 |
< |
* Return the number of elements in this collection. |
206 |
> |
* Returns the number of elements in this collection. |
207 |
|
*/ |
208 |
|
public int size() { |
209 |
|
return count.get(); |
212 |
|
// this doc comment is a modified copy of the inherited doc comment, |
213 |
|
// without the reference to unlimited queues. |
214 |
|
/** |
215 |
< |
* Return the number of elements that this queue can ideally (in |
215 |
> |
* Returns the number of elements that this queue can ideally (in |
216 |
|
* the absence of memory or resource constraints) accept without |
217 |
|
* blocking. This is always equal to the initial capacity of this queue |
218 |
|
* less the current <tt>size</tt> of this queue. |
227 |
|
} |
228 |
|
|
229 |
|
/** |
230 |
< |
* Add the specified element to the tail of this queue, waiting if |
230 |
> |
* Adds the specified element to the tail of this queue, waiting if |
231 |
|
* necessary for space to become available. |
232 |
|
* @throws NullPointerException {@inheritDoc} |
233 |
|
*/ |
268 |
|
} |
269 |
|
|
270 |
|
/** |
271 |
< |
* Add the specified element to the tail of this queue, waiting if |
271 |
> |
* Adds the specified element to the tail of this queue, waiting if |
272 |
|
* necessary up to the specified wait time for space to become available. |
273 |
|
* @throws NullPointerException {@inheritDoc} |
274 |
|
*/ |
308 |
|
} |
309 |
|
|
310 |
|
/** |
311 |
< |
* Add the specified element to the tail of this queue if possible, |
311 |
> |
* Adds the specified element to the tail of this queue if possible, |
312 |
|
* returning immediately if this queue is full. |
313 |
|
* |
314 |
|
* @throws NullPointerException {@inheritDoc} |