I want to store an event and its subscriber and publisher in a map. Here map key is the event and mapped value is subscriber and the publisher. But the type of publisher and subscriber are different. But map gives only a certain type of mapped value.
How to handle this things or is there any other data structure for it??