Making user defined Map
<p>I have a pojo named Employee, now I want to make a user defined collection that I want to put on a map. Please advise me how to achieve this.</p>

<pre><code>public class Employee {
    String name,job;
    int salary;

    public Employee(String n , String j, int t) {
        this.name= n;
        this.job=j;
        this.salary= t;          
    }

    @Override
    public int hashCode() {      
        return name.hashCode()+job.hashCode()+salary;        
    }

    @Override
    public boolean equals(Object obj) {  
        Employee e = (Employee) obj;    
        return this.name.equals(e.name) &amp;&amp; this.job.equals(e.job)
                   &amp;&amp; this.salary == e.salary;
    }   
}
</code></pre>
