Lines Matching refs:tail

92      * thus avoiding head and tail wrapping around to equal each
101 * arbitrary number equal to tail if the deque is empty.
106 * The index at which the next element would be added to the tail
109 private transient int tail;
145 * when head and tail have wrapped around to become equal.
148 assert head == tail;
160 tail = n;
171 if (head < tail) {
173 } else if (head > tail) {
176 System.arraycopy(elements, 0, a, headPortionLen, tail);
228 if (head == tail)
243 elements[tail] = e;
244 if ( (tail = (tail + 1) & (elements.length - 1)) == head)
303 int t = (tail - 1) & (elements.length - 1);
308 tail = t;
326 E x = elements[(tail - 1) & (elements.length - 1)];
337 return elements[(tail - 1) & (elements.length - 1)];
342 * deque (when traversing the deque from head to tail).
370 * deque (when traversing the deque from head to tail).
384 int i = (tail - 1) & mask;
511 assert elements[tail] == null;
512 assert head == tail ? elements[head] == null :
514 elements[(tail - 1) & (elements.length - 1)] != null);
520 * adjusting head and tail as necessary. This can result in motion of
533 final int t = tail;
537 // Invariant: head <= i < tail mod circularity
554 if (i < t) { // Copy the null tail as well
556 tail = t - 1;
561 tail = (t - 1) & mask;
575 return (tail - head) & (elements.length - 1);
584 return head == tail;
589 * will be ordered from first (head) to last (tail). This is the same
613 private int fence = tail;
631 if (tail != fence || result == null)
643 fence = tail;
652 * tail instead of head for initial cursor, and head instead of
653 * tail for fence.
655 private int cursor = tail;
730 int t = tail;
732 head = tail = 0;
845 for (int i = head; i != tail; i = (i + 1) & mask)
860 tail = size;