 <p>It seems better to use HashMap's boolean containsKey(Object key) method instead of the direct invocation of equalsIgnore..() in main(). If necessary, you may create your own class implement interface Map, and make it a delegator of its HashMap-typed field for customized management of key comparisons.(You may override equals() and hashCode() for keys. Item 8 and Item 9 in Effective Java 2nd ed. by Josh Bloch will give you detailed guide.)</p>