users@jsr311.java.net

Re: static Variant.newListBuilder() ?

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Thu, 26 Jun 2008 09:29:15 -0400

On Jun 26, 2008, at 6:48 AM, Stephan Koops wrote:
>
> is it useful to safe some code and allow
> List<Variant> variants =
> Variant.newListBuilder().mediaTypes(...).languages(...).build(); ?
>
Yes. We can even avoid the newListBuilder if we add static mediaTypes,
languages, ... methods. I'll do that.

Marc.

> Now the deveolper must call
> List<Variant> variants =
> VariantListBuilder
> .newInstance().mediaTypes(...).languages(...).build();
>
> This proposal corresponds to Response, where you also don't need to
> directly call the ResponseBilder. The newInstance() call doesn't
> look nice in application code IMO.
> And it saves some chars of code and an import statement :-)
>
> best regards
> Stephan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: users-help_at_jsr311.dev.java.net
>

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.