Hello,
I have a programming requirement wherein I need to lookup for a value from a HashTable based on a Key. Let us call this Key as K1 and the value as Employee Name. So basically I have a HashTable with K1 as Key and Name as values.
Now, I need to introduce a new Key K2, with a one-to-one relation between K1 and K2. So I should be able to lookup using either K1 or K2 and I should get the values for all.
You can think of K1 and K2 as SSN and Employee ID within a company.
I can have another HashTable ofcourse, but is there a better and simpler way to implement this in java.
Patnim
I have a programming requirement wherein I need to lookup for a value from a HashTable based on a Key. Let us call this Key as K1 and the value as Employee Name. So basically I have a HashTable with K1 as Key and Name as values.
Now, I need to introduce a new Key K2, with a one-to-one relation between K1 and K2. So I should be able to lookup using either K1 or K2 and I should get the values for all.
You can think of K1 and K2 as SSN and Employee ID within a company.
I can have another HashTable ofcourse, but is there a better and simpler way to implement this in java.
Patnim