I have the following issue whereby I am comparing two Hash sets (both with String values in them). I need to compare both hash sets to keep only that data in set A which is also present in set B:
Set A has these values:
[YNVOTXAguONvMRiK8C6WzGAUlyf2]
[YADfoWtZXSUtrMhN2JfhnS5lJYE3]
Set B has this value:
[YADfoWtZXSUtrMhN2JfhnS5lJYE3]
As you can notice, the 2nd key of set A and the key in set B are identical. However when I compare both sets using the code below, the result I get is false
:
Log.e("boolean value", "" + chatList.get(i).userId.keySet().contains(userId.keySet()));
Can someone please point me in the right direction?