@Test public void testEquals() { KeyToGroupMap m1 = new KeyToGroupMap("Default Group"); KeyToGroupMap m2 = new KeyToGroupMap("Default Group"); assertEquals(m1, m2); assertEquals(m2, m1); m1.mapKeyToGroup("K1", "G1"); assertFalse(m1.equals(m2)); m2.mapKeyToGroup("K1", "G1"); assertEquals(m1, m2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof KeyToGroupMap)) { return false; } KeyToGroupMap that = (KeyToGroupMap) obj; if (!ObjectUtilities.equal(this.defaultGroup, that.defaultGroup)) { return false; } if (!this.keyToGroupMap.equals(that.keyToGroupMap)) { return false; } return true; }
KeyToGroupMap implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof KeyToGroupMap)) { return false; } KeyToGroupMap that = (KeyToGroupMap) obj; if (!ObjectUtilities.equal(this.defaultGroup, that.defaultGroup)) { return false; } if (!this.keyToGroupMap.equals(that.keyToGroupMap)) { return false; } return true; } }
KeyToGroupMap implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof KeyToGroupMap)) { return false; } KeyToGroupMap that = (KeyToGroupMap) obj; if (!ObjectUtilities.equal(this.defaultGroup, that.defaultGroup)) { return false; } if (!this.keyToGroupMap.equals(that.keyToGroupMap)) { return false; } return true; } KeyToGroupMap();  KeyToGroupMap(Comparable defaultGroup); }
KeyToGroupMap implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof KeyToGroupMap)) { return false; } KeyToGroupMap that = (KeyToGroupMap) obj; if (!ObjectUtilities.equal(this.defaultGroup, that.defaultGroup)) { return false; } if (!this.keyToGroupMap.equals(that.keyToGroupMap)) { return false; } return true; } KeyToGroupMap();  KeyToGroupMap(Comparable defaultGroup); int getGroupCount(); List<Comparable> getGroups(); int getGroupIndex(Comparable group); Comparable getGroup(Comparable key); void mapKeyToGroup(Comparable key, Comparable group); int getKeyCount(Comparable group); @Override boolean equals(Object obj); @Override Object clone(); }
KeyToGroupMap implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof KeyToGroupMap)) { return false; } KeyToGroupMap that = (KeyToGroupMap) obj; if (!ObjectUtilities.equal(this.defaultGroup, that.defaultGroup)) { return false; } if (!this.keyToGroupMap.equals(that.keyToGroupMap)) { return false; } return true; } KeyToGroupMap();  KeyToGroupMap(Comparable defaultGroup); int getGroupCount(); List<Comparable> getGroups(); int getGroupIndex(Comparable group); Comparable getGroup(Comparable key); void mapKeyToGroup(Comparable key, Comparable group); int getKeyCount(Comparable group); @Override boolean equals(Object obj); @Override Object clone();  }