-
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
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
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
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
: 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
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
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
(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
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
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
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
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,
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
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
14 matches
Mail list logo