Well, I am having two keys and 3 values for that. Say key1,key2,value1,value2,value3. In future may the values can be increased like value4, value5 so on.
I need to get the values(value1,value2,value3) either by key1 or key2. The key1 will be unique, and key2 is not.
Currently, I am using ENUM for this configuration as like below
public enum EnumClass
{
Object1(Key1,Key2,Value1,Value2,Value3);
}
There will be more than 100 objects. As of now, I am using this ENUM class with 2 maps Map<key1,ENUM>
and Map<key2,ENUM>
Is there any other solution that is better than the current solution?
Map
(if you need to have the key "at hand").