List<Parameter> doesn't seem like the right abstraction, even when provided
as Series. Parameters seem more akin to a multimap than to a sequence of
key-value pairs. And for the (many?) users who don't take advantage of the
multiplicity they are closer to regular maps. If sequence of keys is
important, one could use a LinkedHashMap.

But maybe this would be too much upheaval to contemplate.

--tim


On Tue, Mar 25, 2008 at 6:08 AM, Jerome Louvel <[EMAIL PROTECTED]> wrote:

>
> Hi Paul,
>
> > You can use List<Parameter> if you write more generic utility classes:
> >
> [...]
> >
> > The bonuses are:
> >
> > 1. The "Series" class doesn't "leak" into places that
> > shouldn't have a
> > dependency on it since you're using an ordinary List.
> >
> > 2. The solution above is completely generic and can be used for lots
> > of other stuff.
> >
> > If you want, you can add other "Util" methods that are convenience
> > methods to lessen typing.
>
> You filter approach is nice and very flexible. However, if you call the
> subList() method, I don't see how the Series class leaks, you can do this:
>
> List<Parameter> fooParams = in.sublist("foo");
>
> You still have the Restlet Parameter class dependency so you might still
> prefer the new getValuesArray("foo") method anyway.
>
> Best regards,
> Jerome
>
>

Reply via email to