I have a requirement ,where i have multiple tuples coming in.
For eg: (a1, b1)
(a2, b2)
(a3, b3)
I need to store these values in datastructure and create a collection of these. Next I will get another tuple as input (an, bn) and i need to check if it is present in the collection.
I used a class with two variables to store it and create collection of object and then use as follows
collection.exists(object => object.a == an && object.b == bn)
Can i use any other better way to achieve this or any other datastructure to use rather than creating class for variable a and b