commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@btopenworld.com>
Subject Re: [collections] general problem with decorators
Date Fri, 03 Oct 2003 23:19:42 GMT
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" <toddster@speakeasy.net>
To: "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>;
"Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>
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:matth@phreaker.net]
> > 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" <bayard@generationjava.com>
> > >
> > >>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: commons-dev-unsubscribe@jakarta.apache.org
> > >>For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> > >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message