public boolean equals(final Object o) {
	if (o == this) {
		return true;
	}

	if (!(o instanceof Map)) {
		return false;
	}
	final Map t = (Map) o;
	if (t.size() != this.size()) {
		return false;
	}

	final Iterator i = this.entrySet().iterator();
	while (i.hasNext()) {
	    final Entry e = (Entry) i.next();
	    final Object key = e.getKey();
	    final Object value = e.getValue();
	    if (value == null) {
		if (!(t.get(key)==null && t.containsKey(key))) {
			return false;
		}
	    } else {
		if (!value.equals(t.get(key))) {
			return false;
		}
	    }
	}
	return true;
    }