----- Original Message -----
From: "Brian McCallister" <[EMAIL PROTECTED]>
> On Monday, November 3, 2003, at 07:48 PM, Stephen Colebourne wrote:
> > I've also changed the way the Mutator works - see what you think, it
> > seems
> > cleaner/quicker I think.
>
> Also a lot less flexible. Mutator is also used in the CompositeSet and
> CompositeList (as yet unposted as they are broken by the changes to
> Collection and I haven't had a chance to update them(and they are not
> yet complete implementations -- only the methods I have needed)) and
> will be in CompositeMap (am looking forward to figuring a nice way to
> do conflict resolution on the Map impl for duplicate keys -- default
> will probably be to throw an exception when a get() is made on a dup
> but will be able to plug it so you can handle however you want)).
>
> I prefer the more fine-grained control of setting them per method. Your
> change it a wee bit quicker to type (probably only four lines for the
> implementor) but significantly reduces the reusability of the Mutator
> interface.
The main aim of the Mutator change was to make the implementation obvious
and typesafe. IMO it does fit better with the collections API. The
reusability of the interface is actually very unclear, as each method will
expect different input parameters and return different result. Under the
original design there was no way to determine which method on the Collection
had acually been called.

I can understand how this might affect the List and Set subclasses, but I
would suggest adapting them to have their own interfaces too.

Stephen

> > The test case still needs looking at as it doesn't extend the
> > collections
> > testframework.
> >
>
> No problem -- It is set up as just a plain JUnit test.
>
> Your thoughts, time, and commentary is much appreciated!
>
> -Brian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to