@Test public void testHashCode() { final String uuid = UUID.randomUUID().toString(); PeerCard peerA = new PeerCard(uuid, PeerRole.COORDINATOR); PeerCard peerB = new PeerCard(uuid, PeerRole.COORDINATOR); PeerCard peerC = new PeerCard(uuid, PeerRole.PEER); assertEquals("equals for Peer should have same hashCode", peerA.hashCode(), peerB.hashCode()); assertEquals("equals for Peer should have same hashCode", peerA.hashCode(), peerC.hashCode()); }
public int hashCode() { return peerID.hashCode(); }
PeerCard { public int hashCode() { return peerID.hashCode(); } }
PeerCard { public int hashCode() { return peerID.hashCode(); } PeerCard(PeerRole role, String containerUnit, String platformUnit);  PeerCard();  PeerCard(String ID, PeerRole role);  PeerCard(String strSerialization); }
PeerCard { public int hashCode() { return peerID.hashCode(); } PeerCard(PeerRole role, String containerUnit, String platformUnit);  PeerCard();  PeerCard(String ID, PeerRole role);  PeerCard(String strSerialization); String getPeerID(); PeerRole getRole(); void setRole(PeerRole role); boolean isCoordinator(); String toString(); int hashCode(); boolean equals(Object o); String getPLATFORM_UNIT(); void setPLATFORM_UNIT(String pLATFORM_UNIT); String getCONTAINER_UNIT(); void setCONTAINER_UNIT(String cONTAINER_UNIT); String getOS(); void setOS(String oS); URI toURI(); }
PeerCard { public int hashCode() { return peerID.hashCode(); } PeerCard(PeerRole role, String containerUnit, String platformUnit);  PeerCard();  PeerCard(String ID, PeerRole role);  PeerCard(String strSerialization); String getPeerID(); PeerRole getRole(); void setRole(PeerRole role); boolean isCoordinator(); String toString(); int hashCode(); boolean equals(Object o); String getPLATFORM_UNIT(); void setPLATFORM_UNIT(String pLATFORM_UNIT); String getCONTAINER_UNIT(); void setCONTAINER_UNIT(String cONTAINER_UNIT); String getOS(); void setOS(String oS); URI toURI();  }