Lines Matching refs:tail

149      * The deque object has two node references, "head" and "tail".
150 * The head and tail are only approximations to the first and last
152 * following prev pointers from head; likewise for tail. However,
153 * it is permissible for head and tail to be referring to deleted
185 * head or tail.
204 * the nodes pointed at by head/tail never get gc-unlinked, since
205 * head/tail are needed to get "back on track" by other nodes that
228 * restart traversal from tail.
262 * - head may not be reachable from the first or last node, or from tail
270 * - the last node is always O(1) reachable from tail via next links
272 * - tail != null
273 * - tail is never gc-unlinked (but may be unlinked)
275 * - tail.item may or may not be null
276 * - tail may not be reachable from the first or last node, or from head
278 private transient volatile Node<E> tail;
393 for (Node<E> t = tail, p = t, q;;) {
396 // Check for tail updates every other hop.
397 // If p == q, we are sure to follow tail instead.
398 p = (t != (t = tail)) ? t : q;
452 // tail/head, before setting x's prev/next links to their
521 updateTail(); // Ensure x is not reachable from tail
546 updateTail(); // Ensure o is not reachable from tail
580 updateTail(); // Ensure o is not reachable from tail
630 * this method will be unreachable from tail after it returns.
631 * Does not guarantee to eliminate slack, only that tail will
635 // Either tail already points to an active node, or we keep
639 while ((t = tail).item == null && (p = t.next) != null) {
650 else if (t != tail)
770 * Guarantees that tail is set to the returned node.
775 for (Node<E> t = tail, p = t, q;;) {
778 // Check for tail updates every other hop.
779 // If p == q, we are sure to follow tail instead.
780 p = (t != (t = tail)) ? t : q;
836 head = tail = new Node<E>(null);
866 * Initializes head and tail, ensuring invariants hold.
881 tail = t;
1005 * Inserts the specified element at the tail of this deque.
1016 * Inserts the specified element at the tail of this deque.
1174 // Atomically append the chain at the tail of this collection
1177 for (Node<E> t = tail, p = t, q;;) {
1180 // Check for tail updates every other hop.
1181 // If p == q, we are sure to follow tail instead.
1182 p = (t != (t = tail)) ? t : q;
1192 // Try a little harder to update tail,
1194 t = tail;
1274 * The elements will be returned in order from first (head) to last (tail).
1292 * last (tail) to first (head).
1464 (k.getDeclaredField("tail"));