On Thu, 24 Jun 2010, Daniel Pitts wrote:
> On 6/24/2010 9:54 AM, Tom Anderson wrote:
>> As Arne implies, they would derive much of their value from being used
>> by other classes throughout the standard library, and that would be a
>> very painful thing to retrofit.
>
> Retrofit, maybe, but adding methods to the Collections class, or creating an
> external class, would not be that painful.
True. Not enormously satisfying, though. You could define a subinterface
of each of the collection interfaces which adds the new methods, then make
the AbstractWhateverCollection classes implement those on top of the
existing methods. That would compatibly and usefully add support.
Something similar was done with NavigableMap and relatives.
tom
--
Thinking about it, history begins now -- sarah
|