@Test public void sameDevsDiffPorts() { title("sameDevsDiffPorts"); UiLinkId one = UiLinkId.uiLinkId(LINK_X1_TO_Y2); UiLinkId other = UiLinkId.uiLinkId(LINK_X1_TO_Y3); print("link one: %s", one); print("link other: %s", other); assertNotEquals("equiv?", one, other); }
private UiLinkId(ElementId a, PortNumber pa, ElementId b, PortNumber pb) { idA = a; portA = pa; idB = b; portB = pb; idStr = a + ID_PORT_DELIMITER + pa + CP_DELIMITER + b + ID_PORT_DELIMITER + pb; }
UiLinkId { private UiLinkId(ElementId a, PortNumber pa, ElementId b, PortNumber pb) { idA = a; portA = pa; idB = b; portB = pb; idStr = a + ID_PORT_DELIMITER + pa + CP_DELIMITER + b + ID_PORT_DELIMITER + pb; } }
UiLinkId { private UiLinkId(ElementId a, PortNumber pa, ElementId b, PortNumber pb) { idA = a; portA = pa; idB = b; portB = pb; idStr = a + ID_PORT_DELIMITER + pa + CP_DELIMITER + b + ID_PORT_DELIMITER + pb; } private  UiLinkId(ElementId a, PortNumber pa, ElementId b, PortNumber pb); }
UiLinkId { private UiLinkId(ElementId a, PortNumber pa, ElementId b, PortNumber pb) { idA = a; portA = pa; idB = b; portB = pb; idStr = a + ID_PORT_DELIMITER + pa + CP_DELIMITER + b + ID_PORT_DELIMITER + pb; } private  UiLinkId(ElementId a, PortNumber pa, ElementId b, PortNumber pb); @Override String toString(); ElementId elementA(); PortNumber portA(); ElementId elementB(); PortNumber portB(); @Override boolean equals(Object o); @Override int hashCode(); static UiLinkId uiLinkId(Link link); }
UiLinkId { private UiLinkId(ElementId a, PortNumber pa, ElementId b, PortNumber pb) { idA = a; portA = pa; idB = b; portB = pb; idStr = a + ID_PORT_DELIMITER + pa + CP_DELIMITER + b + ID_PORT_DELIMITER + pb; } private  UiLinkId(ElementId a, PortNumber pa, ElementId b, PortNumber pb); @Override String toString(); ElementId elementA(); PortNumber portA(); ElementId elementB(); PortNumber portB(); @Override boolean equals(Object o); @Override int hashCode(); static UiLinkId uiLinkId(Link link);  }