RFR : 6799426 : (xs) Add constructor PriorityQueue(Comparator)
martinrb at google.com
Wed Jul 24 23:30:34 UTC 2013
PriorityQueue is unusual in that Doug maintains a copy in jsr166 CVS even
though it is a non-thread-safe collection. I think it makes sense,
because PriorityQueue and PriorityBlockingQueue have parallel APIs and
parallel implementations. Many changes to one file require a matching
change to the other.
Regarding this particular change, if PriorityQueue gets a new constructor
taking a Comparator, then PriorityBlockingQueue probably should too (but I
haven't looked at the patch in detail)
On Mon, Jul 22, 2013 at 12:24 PM, Mike Duigou <mike.duigou at oracle.com>wrote:
> Hello all;
> A simple rewiew for the addition of another constructor to PriorityQueue.
> Currently if you wish to specify a Comparator you must also supply a size.
> This addition allows use of the default size which is good for two reason;
> you don't have to specify a fixed value and the implementation can change
> it's default as appropriate.
More information about the core-libs-dev