/** * Adds an entry at the end of the list of which this item is the head. @GuardedBy("manager.lock") */ final void addLast(InternalJob entry) { InternalJob last = this; // find the end of the queue while (last.previous != null) last = last.previous; // add the new entry to the end of the queue last.previous = entry; entry.next = last; entry.previous = null; }