@Test public void testToURI() { final String uuid = UUID.randomUUID().toString(); PeerCard peerA = new PeerCard(uuid, PeerRole.COORDINATOR); assertEquals("URI of PeerId is wrong", "urn:uuid:" + uuid, peerA.toURI().toString()); }
public URI toURI() { synchronized (this) { if (uri != null) { return uri; } try { uri = new URI(URI_PREFIX + peerID); } catch (URISyntaxException ex) { System.err.println("Failed to generate URI for PeerCard, due to exception"); ex.printStackTrace(System.err); } return uri; } }
PeerCard { public URI toURI() { synchronized (this) { if (uri != null) { return uri; } try { uri = new URI(URI_PREFIX + peerID); } catch (URISyntaxException ex) { System.err.println("Failed to generate URI for PeerCard, due to exception"); ex.printStackTrace(System.err); } return uri; } } }
PeerCard { public URI toURI() { synchronized (this) { if (uri != null) { return uri; } try { uri = new URI(URI_PREFIX + peerID); } catch (URISyntaxException ex) { System.err.println("Failed to generate URI for PeerCard, due to exception"); ex.printStackTrace(System.err); } return uri; } } PeerCard(PeerRole role, String containerUnit, String platformUnit);  PeerCard();  PeerCard(String ID, PeerRole role);  PeerCard(String strSerialization); }
PeerCard { public URI toURI() { synchronized (this) { if (uri != null) { return uri; } try { uri = new URI(URI_PREFIX + peerID); } catch (URISyntaxException ex) { System.err.println("Failed to generate URI for PeerCard, due to exception"); ex.printStackTrace(System.err); } return uri; } } 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 URI toURI() { synchronized (this) { if (uri != null) { return uri; } try { uri = new URI(URI_PREFIX + peerID); } catch (URISyntaxException ex) { System.err.println("Failed to generate URI for PeerCard, due to exception"); ex.printStackTrace(System.err); } return uri; } } 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();  }