Containkey(List<String> key ) and get(List<String> key ) operations on Map Datastructure
<p>In my current project, I have implemented following data structure in Java.</p>

<pre><code>Map&lt;List&lt;String&gt;, Set&lt;Subscriber&gt;&gt; regionSubscriber 
= new Hashtable&lt;List&lt;String&gt;, Set&lt;Subscriber&gt;&gt;();
</code></pre>

<p>I want to implement following operations on above mentioned data structure.</p>

<p>1) Check the key exists in this map or not  ( similar to <code>containsKey(Key)</code> ). 
2) Get the Set with key List ( similar to <code>get(key)</code> ).</p>

<p>I have tried with default functions of Map like <code>containskey(Key)</code> and <code>get(Key)</code> . But, they are not working because, here the Key is List (not a single Object).</p>

<p>Could you advise me on the implementation of the operations ? Let me know If you need more detail for clarity.</p>

<hr>

<p>Update: I have written following  equals() and  hashCode() functions. Kindly check these functions. They are not working.  Any corrections on these functions.</p>

<pre><code>public boolean equals(Object obj){
        boolean booleanFlag = false;
        List&lt;String&gt; regionID = (List&lt;String&gt;) obj;
        for(int i=0; i&lt; regionID.size() ; i++) {
            if ( regionID.get(i).equals(this.regionIDs.get(i)) ){
                booleanFlag = true;             
            } else {
                booleanFlag = false;
            }           
        }       
        return booleanFlag;     
    }



@Override
    public int hashCode() {
        int hashValue = 0;
        for(int i=0; i&lt; regionIDs.size(); i++) {
            hashValue = hashValue + regionIDs.get(i).hashCode();
        }               
            return hashValue;
    }
</code></pre>
