public boolean equals(Object obj)
{
if (!(obj instanceof CharKeyMap))
return false;
CharKeyMap map = (CharKeyMap)obj;
if (size()!=map.size())
return false;
CharKeyMapIterator i = entries();
while (i.hasNext())
{
i.next();
char k = i.getKey();
Object v = i.getValue();
if (v==null)
{
if (map.get(k)!=null)
return false;
if (!map.containsKey(k))
return false;
}
else
{
if (!v.equals(map.get(k)))
return false;
}
}
return true;
}