They are decorators at least in part because of the package name. They could have been split by functionality into a predicated/typed etc packages but how we have it works OK.
I guess if you think of OrderedSet as a class, rather than just as a decorator, then this addition makes sense. Stephen ----- Original Message ----- From: "Phil Steitz" <[EMAIL PROTECTED]> > Call me the odd man out, but it is not obvious to me that a decorator > *should* include an instance factory. This seems odd to me. > > If instance factories really are necessary, might it not make more sense > to add them to the *Utils classes instead? > > Phil > > __matthewHawthorne wrote: > > Sometimes, I wish there was such a thing as static interitance. Either > > that or some type of code generation could be used, maybe? Could > > velocity do this? > > > > > > > > > > Stephen Colebourne wrote: > > > >> newInstance is probably best. Although its certainly not a fun job going > >> through all the decorators to add this. Any patch volunteers? > >> > >> Stephen > >> > >> ----- Original Message ----- > >> From: "Todd Jonker" <[EMAIL PROTECTED]> > >> To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]>; > >> "Jakarta Commons Developers List" <[EMAIL PROTECTED]> > >> Sent: Friday, October 03, 2003 7:07 PM > >> Subject: Re: [collections] general problem with decorators > >> > >> > >> > >>> I like newInstance. Unlike defaultInstance, it clearly allocates a new > >> > >> > >> object. defaultInstance sounds singleton-y. > >> > >>> .T. > >>> > >>> > >>>> -----Original Message----- > >>>> From: __matthewHawthorne [mailto:[EMAIL PROTECTED] > >>>> Sent: Friday, October 3, 2003 01:26 AM > >>>> To: 'Jakarta Commons Developers List' > >>>> Subject: Re: [collections] general problem with decorators > >>>> > >>>> I would prefer something like: > >>>> > >>>> OrderedSet.defaultInstance() > >>>> > >>>> or > >>>> > >>>> OrderedSet.newInstance() > >>>> > >>>> It seems more standard... what do you think? > >>>> > >>>> > >>>> > >>>> > >>>> Stephen Colebourne wrote: > >>>> > >>>>> This sounds OK, but what would the method be called? > >>>>> > >>>>> OrderedSet.decorate() > >>>>> OrderedSet.decorateHashSet() > >>>>> > >>>>> ? > >>>>> Stephen > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: "Henri Yandell" <[EMAIL PROTECTED]> > >>>>> > >>>>>> Basically, the lack of empty constructors with default decoration > >>>>>> decisions. Example I'm looking at: > >>>>>> > >>>>>> I want an OrderedSet. The only way to get this is: > >>>>>> > >>>>>> OrderedSet.decorate( new HashSet() ) > >>>>>> > >>>>>> [okay, could do TreeSet etc, also could use MapUtils]. > >>>>>> > >>>>>> I don't know about you, but this feels odd. :) Especially as the user > >>>>>> knows that HashSet is unordered, so why provide it. > >>>>>> > >>>>>> This may be a unique example, but it seems that we could choose a > >>>>> > >> > >> default > >> > >>>>>> empty map for each one. > >>>>>> > >>>>>> Just a view.. > >>>>>> > >>>>>> Hen > >>>>>> > >>>>>> > >>>>>> --------------------------------------------------------------------- > >>>>>> 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] > >>>> > >>>> > >>>> > >>> > >>> > >>> > >>> --------------------------------------------------------------------- > >>> 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] > > > > > > > --------------------------------------------------------------------- > 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]