public boolean equals(Object obj) { if (!(obj instanceof Map.Entry)) { return false; } return equals((Map.Entry) obj); }
public void testEquallity() { assertTrue(entry.equals(entry)); assertEquals(hashMapEntry.hashCode(), entry.hashCode()); assertTrue(hashMapEntry.equals(entry)); assertTrue(entry.equals(hashMapEntry)); assertFalse(entry.equals(hashMapEntry.toString())); assertFalse(entry.equals(new MapEntry(entry.getKey(), entry.getKey()))); assertFalse(((MapEntry) entry).equals((Map.Entry) null)); }
private void setEntries(String key, String val) { entry = new MapEntry(key, val); Map map = new HashMap(); map.put(key, val); hashMapEntry = (Map.Entry) map.entrySet().iterator().next(); }
public boolean equals(Map.Entry other) { if (other == this) { return true; } if ((other == null) || (hashCode() != other.hashCode())) { return false; } return equals.nullSafe(key, other.getKey()) && equals.nullSafe(value, other.getValue()); }
public void testEquallity() { assertTrue(entry.equals(entry)); assertEquals(hashMapEntry.hashCode(), entry.hashCode()); assertTrue(hashMapEntry.equals(entry)); assertTrue(entry.equals(hashMapEntry)); assertFalse(entry.equals(hashMapEntry.toString())); assertFalse(entry.equals(new MapEntry(entry.getKey(), entry.getKey()))); assertFalse(((MapEntry) entry).equals((Map.Entry) null)); }
private void setEntries(String key, String val) { entry = new MapEntry(key, val); Map map = new HashMap(); map.put(key, val); hashMapEntry = (Map.Entry) map.entrySet().iterator().next(); }
public boolean equals(Map.Entry other) { if (other == this) { return true; } if (other == null) { return false; } if (hashCode() == other.hashCode()) { if (equals.nullSafe(key, other.getKey())) { return equals.nullSafe(value, other.getValue()); } } return false; }
public Set entrySet() { Set entries = new LinkedHashSet(); for (Iterator iter = original.entrySet().iterator(); iter.hasNext();) { Object key = ((Map.Entry) iter.next()).getKey(); entries.add(new MapEntry(key, get(key))); } return entries; }
public boolean equals(Map.Entry other) { if (other == this) { return true; } if ((other == null) || (hashCode() != other.hashCode())) { return false; } return equals.nullSafe(key, other.getKey()) && equals.nullSafe(value, other.getValue()); }
public boolean equals(Object obj) { if (!(obj instanceof Map.Entry)) { return false; } return equals((Map.Entry) obj); }
@Override public Set entrySet() { Set entries = new LinkedHashSet(); for (Iterator iter = keySet().iterator(); iter.hasNext();) { Object key = iter.next(); entries.add(new MapEntry(key, get(key))); } return entries; }
@Override public boolean equals(Object obj) { if (!(obj instanceof Map.Entry)) { return false; } return equals((Map.Entry) obj); }
public Set entrySet() { Set entries = new LinkedHashSet(); for (Iterator iter = keySet().iterator(); iter.hasNext();) { Object key = iter.next(); entries.add(new MapEntry(key, get(key))); } return entries; }