--- jsr166/src/jsr166x/LinkedBlockingDeque.java 2012/02/21 01:54:03 1.10
+++ jsr166/src/jsr166x/LinkedBlockingDeque.java 2013/01/16 00:51:11 1.14
@@ -14,7 +14,7 @@ import java.util.concurrent.locks.*;
* An optionally-bounded {@linkplain BlockingDeque blocking deque} based on
* linked nodes.
*
- *
The optional capacity bound constructor argument serves as a
+ *
The optional capacity bound constructor argument serves as a
* way to prevent excessive expansion. The capacity, if unspecified,
* is equal to {@link Integer#MAX_VALUE}. Linked nodes are
* dynamically created upon each insertion unless this would bring the
@@ -76,7 +76,7 @@ public class LinkedBlockingDeque
private final Condition notFull = lock.newCondition();
/**
- * Creates a LinkedBlockingDeque with a capacity of
+ * Creates a {@code LinkedBlockingDeque} with a capacity of
* {@link Integer#MAX_VALUE}.
*/
public LinkedBlockingDeque() {
@@ -84,10 +84,10 @@ public class LinkedBlockingDeque
}
/**
- * Creates a LinkedBlockingDeque with the given (fixed)
+ * Creates a {@code LinkedBlockingDeque} with the given (fixed)
* capacity.
* @param capacity the capacity of this deque
- * @throws IllegalArgumentException if capacity is less than 1
+ * @throws IllegalArgumentException if {@code capacity} is less than 1
*/
public LinkedBlockingDeque(int capacity) {
if (capacity <= 0) throw new IllegalArgumentException();
@@ -95,13 +95,13 @@ public class LinkedBlockingDeque
}
/**
- * Creates a LinkedBlockingDeque with a capacity of
+ * Creates a {@code LinkedBlockingDeque} with a capacity of
* {@link Integer#MAX_VALUE}, initially containing the elements of the
* given collection,
* added in traversal order of the collection's iterator.
* @param c the collection of elements to initially contain
- * @throws NullPointerException if c or any element within it
- * is null
+ * @throws NullPointerException if {@code c} or any element within it
+ * is {@code null}
*/
public LinkedBlockingDeque(Collection extends E> c) {
this(Integer.MAX_VALUE);
@@ -444,7 +444,7 @@ public class LinkedBlockingDeque
/**
* Returns the number of elements in this deque.
*
- * @return the number of elements in this deque.
+ * @return the number of elements in this deque
*/
public int size() {
lock.lock();
@@ -459,11 +459,11 @@ public class LinkedBlockingDeque
* Returns the number of elements that this deque can ideally (in
* the absence of memory or resource constraints) accept without
* blocking. This is always equal to the initial capacity of this deque
- * less the current size of this deque.
+ * less the current {@code size} of this deque.
* Note that you cannot always tell if
- * an attempt to add an element will succeed by
- * inspecting remainingCapacity because it may be the
- * case that a waiting consumer is ready to take an
+ * an attempt to {@code add} an element will succeed by
+ * inspecting {@code remainingCapacity} because it may be the
+ * case that a waiting consumer is ready to {@code take} an
* element out of an otherwise full deque.
*/
public int remainingCapacity() {
@@ -641,13 +641,13 @@ public class LinkedBlockingDeque
/**
* Returns an iterator over the elements in this deque in proper sequence.
- * The returned Iterator is a "weakly consistent" iterator that
+ * The returned {@code Iterator} is a "weakly consistent" iterator that
* will never throw {@link java.util.ConcurrentModificationException},
* and guarantees to traverse elements as they existed upon
* construction of the iterator, and may (but is not guaranteed to)
* reflect any modifications subsequent to construction.
*
- * @return an iterator over the elements in this deque in proper sequence.
+ * @return an iterator over the elements in this deque in proper sequence
*/
public Iterator iterator() {
return new Itr();
@@ -664,7 +664,7 @@ public class LinkedBlockingDeque
* an element exists in hasNext(), we must return item read
* under lock (in advance()) even if it was in the process of
* being removed when hasNext() was called.
- **/
+ */
private E nextItem;
/**
@@ -720,7 +720,7 @@ public class LinkedBlockingDeque
* Saves the state to a stream (that is, serializes it).
*
* @serialData The capacity (int), followed by elements (each an
- * Object) in the proper order, followed by a null
+ * {@code Object}) in the proper order, followed by a null
* @param s the stream
*/
private void writeObject(java.io.ObjectOutputStream s)