Lines Matching defs:last

96      * "last" node terminating any chain of next references starting at
97 * a live node. The "first" and "last" nodes may or may not be live.
98 * The "first" and "last" nodes are always mutually reachable.
101 * next reference in the first or last node to a fresh node
106 * first or last node. Active nodes cannot be unlinked.
120 * The head and tail are only approximations to the first and last
143 * prev links from the last node. However, this is not true for
192 * dummy node, NEXT_TERMINATOR, and not the last active node.
196 * find the last (active) node, for enqueueing a new node, we need
232 * - head may not be reachable from the first or last node, or from tail
237 * A node from which the last node on list (that is, the unique node p
240 * - the last node is always O(1) reachable from tail via next links
241 * - all live nodes are reachable from the last node via pred()
246 * - tail may not be reachable from the first or last node, or from head
352 * Links e as last element.
368 // p is last node
531 * Unlinks non-null last node.
533 private void unlinkLast(Node<E> last, Node<E> prev) {
534 // assert last != null;
536 // assert last.item == null;
539 if (o != null && p.next != p && last.casPrev(prev, p)) {
541 if (last.next == null &&
543 p.next == last) {
602 // trying to cas it to the last node until it does.
698 * Returns the predecessor of p, or the last node if p.prev has been
704 return (p == q) ? last() : q;
733 * Returns the last node, the unique node p for which:
738 Node<E> last() {
883 for (Node<E> p = last(); p != null; p = pred(p)) {
917 for (Node<E> p = last(); p != null; p = pred(p)) {
1014 * Removes the last occurrence of the specified element from this deque.
1016 * More formally, removes the last element {@code e} such that
1027 for (Node<E> p = last(); p != null; p = pred(p)) {
1131 Node<E> beginningOfTheEnd = null, last = null;
1135 beginningOfTheEnd = last = newNode;
1137 last.lazySetNext(newNode);
1138 newNode.lazySetPrev(last);
1139 last = newNode;
1157 // p is last node
1162 if (!casTail(t, last)) {
1166 if (last.next == null)
1167 casTail(t, last);
1242 * proper sequence (from first to last element).
1259 * in proper sequence (from first to last element); the runtime
1302 * The elements will be returned in order from first (head) to last (tail).
1316 * last (tail) to first (head).
1406 Node<E> startNode() { return last(); }