private Entry mergeLists(Entry a, Entry b) {
        if (a == null) return b;
        if (b == null) return a;

        // splice the two circular lists together like a Mobius strip
        final Entry aOldNext = a.next;
        a.next = b.next;
        a.next.previous = a;
        b.next = aOldNext;
        b.next.previous = b;

        return comparator.compare(a.priority, b.priority) < 0 ? a : b;
    }
private Entry mergeLists ( Entry a , Entry b ) { if ( a == null ) return b ; if ( b == null ) return a ; final Entry aOldNext = a . next ; a . next = b . next ; a . next . previous = a ; b . next = aOldNext ; b . next . previous = b ; return comparator . compare ( a . priority , b . priority ) < 0 ? a : b ; }
Merge two doubly-linked circular lists, given a pointer into each.
Return the smaller of the two arguments.