private void add(PQueueEntry a) { if (head != null) { a.setNext(head); head.setPrev(a); } head = a; size++; }