RE: Series.getValues()

2008-03-28 Thread Jerome Louvel
- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Tim Peierls Envoyé : jeudi 27 mars 2008 19:51 À : discuss@restlet.tigris.org Objet : Re: Series.getValues() ListParameter doesn't seem like the right abstraction, even when provided as Series. Parameters seem more akin

Re: Series.getValues()

2008-03-27 Thread Tim Peierls
ListParameter 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

RE: Series.getValues()

2008-03-25 Thread Jerome Louvel
Hi Paul, You can use ListParameter 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

Re: Series.getValues()

2008-03-24 Thread Paul J. Lucas
On Mar 23, 2008, at 10:50 AM, Jerome Louvel wrote: Paul, the Series class address the lack of a structure maintaining a list of named entries. There is no reusable Parameter class (name, value pair) in the JDK. Only the Map.EntryK,V interface comes close to it. Having just a ListParameter

RE: Series.getValues()

2008-03-23 Thread Jerome Louvel
: Series.getValues() Stephan Koops wrote: Series is also a List. you can handle it as List. Not exactly. Series is a List of Parameters. If there were a getValues(paramName) call that returned a list of Strings, that would be just as good as an array of Strings from my perspective

Re: Series.getValues()

2008-03-23 Thread William Pietri
Jerome Louvel wrote: I've added a new method on Series: getValuesArray(String name):String[]. There is already a getValues(String name):String method so I had to prepend the 'Array' suffix. Code checked in SVN trunk. Fab! Thanks for that. I know that many people don't make use of the

Re: Series.getValues()

2008-03-22 Thread William Pietri
method? Best regards, Jerome -Message d'origine- De : Paul J. Lucas [mailto:[EMAIL PROTECTED] Envoyé : jeudi 20 mars 2008 16:27 À : discuss@restlet.tigris.org Objet : Series.getValues() Sorry if this is a duplicate, but I never say my original message echo to the list. Begin

Re: Series.getValues()

2008-03-22 Thread Stephan Koops
(String name) or subArray(String name) shortcut method? Best regards, Jerome -Message d'origine- De : Paul J. Lucas [mailto:[EMAIL PROTECTED] Envoyé : jeudi 20 mars 2008 16:27 À : discuss@restlet.tigris.org Objet : Series.getValues() Sorry if this is a duplicate, but I never say my

Re: Series.getValues()

2008-03-22 Thread Paul J. Lucas
On Mar 22, 2008, at 4:21 AM, Stephan Koops wrote: is it necessary to use the legacy datatype array? Since when is an array a legacy datatype? (If this were C++ instead of Java, that question would have more merit.) I think never the Series deals with arrays. What about returning

Re: Series.getValues()

2008-03-22 Thread Stephan Koops
Hello Paul, is it necessary to use the legacy datatype array? Since when is an array a legacy datatype? (If this were C++ instead of Java, that question would have more merit.) Since we have java.util.List. Ok, sometime it is useful to ue arrays, but IMO in the most cases the list is the

Re: Series.getValues()

2008-03-22 Thread Paul J. Lucas
On Mar 22, 2008, at 11:16 AM, Stephan Koops wrote: Since we have java.util.List. Ok, sometime it is useful to ue arrays, but IMO in the most cases the list is the better solution. Typically you collect the result in a List, because you don't know the result size. Than you perhaps convert

Re: Series.getValues()

2008-03-22 Thread William Pietri
Stephan Koops wrote: Series is also a List. you can handle it as List. Not exactly. Series is a List of Parameters. If there were a getValues(paramName) call that returned a list of Strings, that would be just as good as an array of Strings from my perspective. But the Series isn't as good,

RE: Series.getValues()

2008-03-21 Thread Jerome Louvel
16:27 À : discuss@restlet.tigris.org Objet : Series.getValues() Sorry if this is a duplicate, but I never say my original message echo to the list. Begin forwarded message: Date: March 19, 2008 4:19:32 PM PDT To: discuss@restlet.tigris.org Subject: Series.getValues() This method

Series.getValues()

2008-03-20 Thread Paul J. Lucas
Sorry if this is a duplicate, but I never say my original message echo to the list. Begin forwarded message: Date: March 19, 2008 4:19:32 PM PDT To: discuss@restlet.tigris.org Subject: Series.getValues() This method, as written in Restlet 1.0.8, specifically this variant: getValues