Lines Matching refs:tail

121      * The deque object has two node references, "head" and "tail".
122 * The head and tail are only approximations to the first and last
124 * following prev pointers from head; likewise for tail. However,
125 * it is permissible for head and tail to be referring to deleted
157 * head or tail.
176 * the nodes pointed at by head/tail never get gc-unlinked, since
177 * head/tail are needed to get "back on track" by other nodes that
200 * restart traversal from tail.
234 * - head may not be reachable from the first or last node, or from tail
242 * - the last node is always O(1) reachable from tail via next links
244 * - tail != null
245 * - tail is never gc-unlinked (but may be unlinked)
247 * - tail.item may or may not be null
248 * - tail may not be reachable from the first or last node, or from head
250 private transient volatile Node<E> tail;
365 for (Node<E> t = tail, p = t, q;;) {
368 // Check for tail updates every other hop.
369 // If p == q, we are sure to follow tail instead.
370 p = (t != (t = tail)) ? t : q;
424 // tail/head, before setting x's prev/next links to their
493 updateTail(); // Ensure x is not reachable from tail
518 updateTail(); // Ensure o is not reachable from tail
552 updateTail(); // Ensure o is not reachable from tail
602 * this method will be unreachable from tail after it returns.
603 * Does not guarantee to eliminate slack, only that tail will
607 // Either tail already points to an active node, or we keep
611 while ((t = tail).item == null && (p = t.next) != null) {
622 else if (t != tail)
742 * Guarantees that tail is set to the returned node.
747 for (Node<E> t = tail, p = t, q;;) {
750 // Check for tail updates every other hop.
751 // If p == q, we are sure to follow tail instead.
752 p = (t != (t = tail)) ? t : q;
808 head = tail = new Node<E>(null);
838 * Initializes head and tail, ensuring invariants hold.
853 tail = t;
977 * Inserts the specified element at the tail of this deque.
988 * Inserts the specified element at the tail of this deque.
1146 // Atomically append the chain at the tail of this collection
1149 for (Node<E> t = tail, p = t, q;;) {
1152 // Check for tail updates every other hop.
1153 // If p == q, we are sure to follow tail instead.
1154 p = (t != (t = tail)) ? t : q;
1164 // Try a little harder to update tail,
1166 t = tail;
1245 * The elements will be returned in order from first (head) to last (tail).
1263 * last (tail) to first (head).
1432 (k.getDeclaredField("tail"));