We have a configuration where each property maps to two values in the DB,
Ex:
Property Name Min Value Max Value
VSMSSUB 100 500
EEVMSSUB 100 500
Now, What collection can be used to store the property and there min & max value ? HashMap is not possible since it is one to one.
or
Can I declare like this ?
HashMap
or
Need to use beans ?
Please suggest your recommendations.
You can use a
HashMapwith the property name as the key and a composite object holding the min and max as value. Example:Then create a
HashMapas:and add key-values: