PriorityQueue.remove(Object) uses its ordering, that is,
either (Comparable)o.compareTo(e), or comparator.compare(o,e).
Instead it should use o.equals(e)... because:
- that's what the base interface Collection.remove(Object) spec says
- the implementation throws ClassCastException, but the spec does not
mention this exception.
- remove(Object) should be consistent with contains(Object), i.e.
remove(Object) should be able to find an element to remove iff
contains(Object) is able to find it. remove(Object) should be
implemented in terms of equals iff contains(Object) is.
###@###.### 2005-05-10 17:43:47 GMT