dev@glassfish.java.net

Re: name/value class?

From: Richard S. Hall <heavy_at_ungoverned.org>
Date: Thu, 29 Apr 2010 19:49:20 -0400

On 4/29/10 7:44 PM, Tim Quinn wrote:
> I don't have other nominees to fill this need from the GlassFish
> source. (There are some name/value related classes in the
> deployment/dol module but they are very focused on descriptor
> processing and might not be too useful generally.)
>
> As I think about this, I usually encounter the need for name/value
> pairs along with the need to collect them and iterate through
> them...features that Map or some other collection provides. So I
> sometimes use a HashMap (or LinkedHashMap if I need the insertion
> order reflected in the iteration order) and then iterate through the
> Map's entrySet members.

Right, I was going to say that Map.Entry is a candidate, no?

-> richard

>
> - Tim
>
> On Apr 29, 2010, at 5:54 PM, Bill Shannon wrote:
>
>> That looks usable, although I find it curious that NO ONE ELSE USES IT!
>>
>> I won't tell you how many other NameValue classes there are in
>> GlassFish...
>>
>> Anyone know of any other such class that's more widely used?
>>
>>
>> Byron Nevins wrote on 04/28/2010 05:12 PM:
>>> [common/common-util] com.sun.enterprise.universal.NameValue
>>> On 4/28/2010 4:32 PM, Bill Shannon wrote:
>>>> I need to keep a list of (HTTP) headers, essentially a list of
>>>> name/value
>>>> string pairs. Anyone want to suggest a class in the core/common
>>>> GlassFish
>>>> packages that I could use?
>>>>
>>>> javax.mail.Header would be perfect (:-)), but I don't want to
>>>> introduce that
>>>> dependency.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>