Combining 2 parameter files into 1 Object.
Hi all,
I have 2 files, one holds a list of parameter in key=value format. And the other one holds the meta for the parameter file with the name of the parameter and "_" and the meta key = value. it looks somthing like this:
File 1:
Max=50
DisableReconnect=N
SendLogonReconnect=Y
File 2:
Max_Name=Max
Max_ValidValues=50,100,150
Max_Mask=###
DisableReconnect_Name=DisableReconnect
DisableReconnect_ValidValues=Y,N
DisableReconnect_Mask=
What would be the best way to that if i know that the each object that i will create is supposed to be displayed as a row in Jtable with the right editor for the value.
Thanks for any help.
On Katalan
[733 byte] By [
onkatalana] at [2007-11-26 19:16:27]

Thanks for your answer p_epi.
I see where u going, but should i build a class that inherits from the "Properties" class or just functions
in my class that create instance of a "Properties" and fills it with the right data?
Thanks for your help
On Katalan
Message was edited by:
onkatalan
> Thanks for your answer p_epi.
>
> I see where u going, but should i build a class that
> inherits from the "Properties" class or just
> functions
> in my class that create instance of a "Properties"
> and fills it with the right data?
>
> Thanks for your help
> On Katalan
>
> Message was edited by:
> onkatalan
I will create class that inherits from "Properties" that take 2 parameters
file1 and file2
> I will create class that inherits from "Properties"
> that take 2 parameters
> file1 and file2
O.K.
I have created "MyProperties" class that gets the files, combine them and create a collection of the object (each parameter gets 1 object).
Is that what u meant to do?
Step 2
If so, I am getting the values as string, which is o.k for all the paramters accept "CurrentValue" which will get its type from the key "Type" in the object.
What will be the best way to deal data type convertions, so that i can later on use that in a swing TableModel for creating/using the right renderers for the cell.
Thank for your help so far
It's was very productive and helpful.
I now that i am getting a little out of this forum scope, but i hope that it is o.k with you.
On Katalan