I want to use the host-id of delivery-predicatability hash map to get delivery-predicatability for a host and I want to use the key value of that host-id to get the matching detail of that host-id from the other two hash maps contact-duration and contact-counter. How can I do so?
r

03-25-2012, 05:07 AM

Fubarable

Re: Interaction between more than one hashmap

Why not create a class that ties all the information together with four fields representing: host-id, host-delivery-predicatability, contact-duration, and contact-counter? Then you can have one HashMap that maps host-id's with objects of this new class.

03-25-2012, 07:05 AM

Al-Hinai

Re: Interaction between more than one hashmap

Quote:

Originally Posted by ;274375

Why not create a class that ties all the information together with four fields representing: host-id, host-delivery-predicatability, contact-duration, and contact-counter? Then you can have one HashMap that maps host-id's with objects of this new class.

Thanks Fubarable for your replay. But how can I tie them together in the new class?

03-25-2012, 03:02 PM

Fubarable

Re: Interaction between more than one hashmap

Quote:

Originally Posted by Al-Hinai

Thanks Fubarable for your replay. But how can I tie them together in the new class?

Please have a look at the Java tutorials: The Really Big Index. Check out the introductory chapters and the "Classes and Objects" chapters.