Comparing multiple hashmaps with Set Elements in java
<p>Could anyone help me to find the easiest possible solution for my scenario.</p>

<p>I have a Treeset with values </p>

<pre><code>["Orders", "Creatives", "Campaigns", "Sales"]
</code></pre>

<p>and a hashmap like</p>

<pre><code>Map&lt;TreeSet&lt;String&gt;, String&gt; tmpSet = new HashMap&lt;TreeSet&lt;String&gt;, String&gt;;
tmpSet.put(new TreeSet&lt;&gt;(Arrays.asList("Orders", "Creatives"), "TABLE_OC");
tmpSet.put(new TreeSet&lt;&gt;(Arrays.asList("Creatives", "Sales"), "TABLE_CS");
</code></pre>

<p>I basically want to compare the keyset of the map with the set elements and return the map values. In this case, I want to return both "TABLE_OC" and "TABLE_CS" as the elements in the set contains the keyset of the map. </p>