@Test public void testEquals() throws Exception { Map<String, Object> values = new HashMap<String, Object>(); values.put("intValue", 1); values.put("booleanValue", true); String[] stringArray = new String[] { "a", "b", "c" }; values.put("stringArray", stringArray); TypedMap map = new TypedMap(recordType, values); TypedMap map2 = new TypedMap(recordType); map2.put("intValue", 1); map2.put("booleanValue", true); map2.put("stringArray", stringArray); assertTrue(map.equals(map2)); assertTrue(map2.equals(map)); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } TypedMap other = (TypedMap) obj; if (inner == null) { if (other.inner != null) { return false; } } else if (!inner.equals(other.inner)) { return false; } if (type == null) { if (other.type != null) { return false; } } else if (!type.equals(other.type)) { return false; } return true; }
TypedMap implements Map<String, Object> { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } TypedMap other = (TypedMap) obj; if (inner == null) { if (other.inner != null) { return false; } } else if (!inner.equals(other.inner)) { return false; } if (type == null) { if (other.type != null) { return false; } } else if (!type.equals(other.type)) { return false; } return true; } }
TypedMap implements Map<String, Object> { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } TypedMap other = (TypedMap) obj; if (inner == null) { if (other.inner != null) { return false; } } else if (!inner.equals(other.inner)) { return false; } if (type == null) { if (other.type != null) { return false; } } else if (!type.equals(other.type)) { return false; } return true; } TypedMap(final RecordType type);  TypedMap(final RecordType type, final Map<? extends String, ? extends Object> map); }
TypedMap implements Map<String, Object> { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } TypedMap other = (TypedMap) obj; if (inner == null) { if (other.inner != null) { return false; } } else if (!inner.equals(other.inner)) { return false; } if (type == null) { if (other.type != null) { return false; } } else if (!type.equals(other.type)) { return false; } return true; } TypedMap(final RecordType type);  TypedMap(final RecordType type, final Map<? extends String, ? extends Object> map); RecordType getType(); Type getFieldType(final String fieldName); void clear(); boolean containsKey(Object arg0); boolean containsValue(Object arg0); Set<Entry<String, Object>> entrySet(); Object get(Object arg0); boolean isEmpty(); Set<String> keySet(); Object put(String arg0, Object arg1); void putAll(Map<? extends String, ? extends Object> arg0); Object remove(Object arg0); int size(); Collection<Object> values(); @Override int hashCode(); @Override boolean equals(Object obj); }
TypedMap implements Map<String, Object> { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } TypedMap other = (TypedMap) obj; if (inner == null) { if (other.inner != null) { return false; } } else if (!inner.equals(other.inner)) { return false; } if (type == null) { if (other.type != null) { return false; } } else if (!type.equals(other.type)) { return false; } return true; } TypedMap(final RecordType type);  TypedMap(final RecordType type, final Map<? extends String, ? extends Object> map); RecordType getType(); Type getFieldType(final String fieldName); void clear(); boolean containsKey(Object arg0); boolean containsValue(Object arg0); Set<Entry<String, Object>> entrySet(); Object get(Object arg0); boolean isEmpty(); Set<String> keySet(); Object put(String arg0, Object arg1); void putAll(Map<? extends String, ? extends Object> arg0); Object remove(Object arg0); int size(); Collection<Object> values(); @Override int hashCode(); @Override boolean equals(Object obj);  }