@Override
    public boolean equals(Object o) {
        if(!(o instanceof MapEntry)) {
            return false;
        }

        MapEntry<?, ?> me = (MapEntry<?, ?>)o;
        return (key == null ? me.getKey() == null : key.equals(me.getKey()))
                && (value == null ? me.getValue() == null : value.equals(me
                        .getValue()));
    }