classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [really patch] Re: HashMap putAll/putAllInternal bug


From: Stephen Crawley
Subject: Re: [really patch] Re: HashMap putAll/putAllInternal bug
Date: Mon, 13 Oct 2003 10:27:40 +1000

"David Holmes" <address@hidden> wrote:
> If you can't provide a valid implementation for any concrete method
> that you are supposed to implement, then it seems quite unreasonable
> of you to expect any inherited methods to work for you. I think it
> quite reasonable for a method like putAll to expect to be able to use
> any of the non-optional methods of Map/Set/Iterator to do its job -
> even if it doesn't document exactly which methods it uses.

The corollary is that if you can't provide a valid (and sufficiently
efficient for your purposes) implementation for an abstract method in
AbstractMap, then you should NOT be extending AbstractMap.  Rather you
should be implementing the Map interface from scratch.

-- Steve





reply via email to

[Prev in Thread] Current Thread [Next in Thread]