commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <>
Subject Re: [collections] BinaryHeap and PriorityQueue
Date Thu, 01 Jan 2004 19:13:10 GMT
I have made the following changes:
- PriorityQueue now disapproved (not deprecated, but the language indicates
it is)
- BinaryHeap in main package is not deprecated, as it is the only
implementation of PQ
- BinaryHeap in buffer subpackage renamed to BinaryBuffer. No longer
implements PQ
- PQ decorators now inner classes of PQUtils

We could go further and actually deprecated PQ. But I'm a little wary of

(And both BinaryHeap and BinaryBuffer still need their remove bug fixing :-)


----- Original Message -----
From: "Stephen Colebourne" <>
> BinaryHeap is a very old collections class, originally from Avalon. It
> implements PriorityQueue interface.
> PQ is an interface that does not extend Collection, Buffer is effectively
> the replacement that does. They use different terms though - PQ
> insert/peek/pop - Buffer add/get/remove. PQ is also badly named as the
> interface specifies nothing about 'priority'.
> Currently I have moved BinaryHeap and the PriorityQueue decorators into
> buffer subpackage (as they seem related). But is this right???
> Possibilities:
> a) BinaryHeap and PQ decorators in buffer subpackage
> b) BinaryHeap and PQ decorators in (new) priorityqueue subpackage
> c) BinaryHeap left in main package where it always was, PQ decorators as
> hidden inner classes on PriorityQueueUtils.
> I think I favour (c), as I'm not a fan of the PQ interface, and this would
> avoid change for this dubious (but probably useful) class/interface.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message