You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Rainer Hirschmiller <ra...@web.de> on 2012/09/25 20:13:35 UTC

[configuration]: getList

Hi,

I use a properties file for configuration which contains a list of 
integer values.

Retrieving the List I got a list of string instead of a list of integer. 
The question now is how can I get a list of integers instead.

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [configuration]: getList

Posted by giris <sr...@yahoo.com>.
Just my .002. Can you just do Integer.valueOf()


________________________________
 From: Rainer Hirschmiller <ra...@web.de>
To: user@commons.apache.org 
Sent: Tuesday, September 25, 2012 2:13 PM
Subject: [configuration]: getList
 
Hi,

I use a properties file for configuration which contains a list of integer values.

Retrieving the List I got a list of string instead of a list of integer. The question now is how can I get a list of integers instead.

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org

Re: [configuration]: getList

Posted by Oliver Heger <ol...@oliver-heger.de>.
Am 25.09.2012 21:43, schrieb Oliver Heger:
> Am 25.09.2012 20:13, schrieb Rainer Hirschmiller:
>> Hi,
>>
>> I use a properties file for configuration which contains a list of
>> integer values.
>>
>> Retrieving the List I got a list of string instead of a list of integer.
>> The question now is how can I get a list of integers instead.

Please forget my last posting. There is a way to do the conversion I 
missed: DataConfiguration provides methods for obtaining lists of 
different types. A conversion for primitive types is done as necessary.

DataConfiguration works as a decorator around standard Configuration 
objects. It provides extended access methods for properties.

Oliver

>
> So far, data conversion only works for single values, I am afraid. But
> this would be a good feature request. For the next major release there
> are some thoughts about an enhanced converter framework.
>
> Oliver
>
>>
>> Rainer
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [configuration]: getList

Posted by Oliver Heger <ol...@oliver-heger.de>.
Am 25.09.2012 20:13, schrieb Rainer Hirschmiller:
> Hi,
>
> I use a properties file for configuration which contains a list of
> integer values.
>
> Retrieving the List I got a list of string instead of a list of integer.
> The question now is how can I get a list of integers instead.

So far, data conversion only works for single values, I am afraid. But 
this would be a good feature request. For the next major release there 
are some thoughts about an enhanced converter framework.

Oliver

>
> Rainer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org