public boolean equalsKrollDict(KrollDict otherDict) { if (otherDict.size() != size()) return false; for (Entry<String, Object> e : entrySet()) { String key = e.getKey(); Object newvalue = e.getValue(); if (!otherDict.containsKeyWithValue(key, newvalue)) return false; } return true; }