--- jsr166/src/jsr166x/LinkedBlockingDeque.java 2011/04/14 23:16:10 1.7
+++ jsr166/src/jsr166x/LinkedBlockingDeque.java 2012/11/18 18:03:10 1.11
@@ -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
@@ -39,7 +39,7 @@ import java.util.concurrent.locks.*;
*/
public class LinkedBlockingDeque
extends AbstractQueue
- implements BlockingDeque, java.io.Serializable {
+ implements BlockingDeque, java.io.Serializable {
/*
* Implemented as a simple doubly-linked list protected by a
@@ -149,7 +149,7 @@ public class LinkedBlockingDeque
}
/**
- * Remove and return first element, or null if empty
+ * Removes and returns first element, or null if empty.
*/
private E unlinkFirst() {
Node f = first;
@@ -167,7 +167,7 @@ public class LinkedBlockingDeque
}
/**
- * Remove and return last element, or null if empty
+ * Removes and returns last element, or null if empty.
*/
private E unlinkLast() {
Node l = last;
@@ -434,8 +434,8 @@ public class LinkedBlockingDeque
// BlockingQueue methods
- public void put(E o) throws InterruptedException { putLast(o); }
- public E take() throws InterruptedException { return takeFirst(); }
+ public void put(E o) throws InterruptedException { putLast(o); }
+ public E take() throws InterruptedException { return takeFirst(); }
public boolean offer(E o, long timeout, TimeUnit unit)
throws InterruptedException { return offerLast(o, timeout, unit); }
public E poll(long timeout, TimeUnit unit)
@@ -717,7 +717,7 @@ public class LinkedBlockingDeque
}
/**
- * Save the state to a stream (that is, serialize it).
+ * 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
@@ -740,8 +740,8 @@ public class LinkedBlockingDeque
}
/**
- * Reconstitute this deque instance from a stream (that is,
- * deserialize it).
+ * Reconstitutes this deque instance from a stream (that is,
+ * deserializes it).
* @param s the stream
*/
private void readObject(java.io.ObjectInputStream s)