@Test public void testToString() { assertNotNull(device4.toString()); }
@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("ValiantSwitch<id="); builder.append(getIdentifier()); builder.append(", connected="); builder.append(connectedTo); builder.append(", routing: "); for (int i = 0; i < destinationToNextSwitch.size(); i++) { if (i != 0) { builder.append(", "); } builder.append(i); builder.append("->"); builder.append(destinationToNextSwitch.get(i)); } builder.append(">"); return builder.toString(); }
EcmpSwitch extends NetworkDevice implements EcmpSwitchRoutingInterface { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("ValiantSwitch<id="); builder.append(getIdentifier()); builder.append(", connected="); builder.append(connectedTo); builder.append(", routing: "); for (int i = 0; i < destinationToNextSwitch.size(); i++) { if (i != 0) { builder.append(", "); } builder.append(i); builder.append("->"); builder.append(destinationToNextSwitch.get(i)); } builder.append(">"); return builder.toString(); } }
EcmpSwitch extends NetworkDevice implements EcmpSwitchRoutingInterface { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("ValiantSwitch<id="); builder.append(getIdentifier()); builder.append(", connected="); builder.append(connectedTo); builder.append(", routing: "); for (int i = 0; i < destinationToNextSwitch.size(); i++) { if (i != 0) { builder.append(", "); } builder.append(i); builder.append("->"); builder.append(destinationToNextSwitch.get(i)); } builder.append(">"); return builder.toString(); } EcmpSwitch(int identifier, TransportLayer transportLayer, int n, Intermediary intermediary); }
EcmpSwitch extends NetworkDevice implements EcmpSwitchRoutingInterface { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("ValiantSwitch<id="); builder.append(getIdentifier()); builder.append(", connected="); builder.append(connectedTo); builder.append(", routing: "); for (int i = 0; i < destinationToNextSwitch.size(); i++) { if (i != 0) { builder.append(", "); } builder.append(i); builder.append("->"); builder.append(destinationToNextSwitch.get(i)); } builder.append(">"); return builder.toString(); } EcmpSwitch(int identifier, TransportLayer transportLayer, int n, Intermediary intermediary); @Override void receive(Packet genericPacket); @Override void receiveFromIntermediary(Packet genericPacket); @Override void addDestinationToNextSwitch(int destinationId, int nextHopId); @Override String toString(); }
EcmpSwitch extends NetworkDevice implements EcmpSwitchRoutingInterface { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("ValiantSwitch<id="); builder.append(getIdentifier()); builder.append(", connected="); builder.append(connectedTo); builder.append(", routing: "); for (int i = 0; i < destinationToNextSwitch.size(); i++) { if (i != 0) { builder.append(", "); } builder.append(i); builder.append("->"); builder.append(destinationToNextSwitch.get(i)); } builder.append(">"); return builder.toString(); } EcmpSwitch(int identifier, TransportLayer transportLayer, int n, Intermediary intermediary); @Override void receive(Packet genericPacket); @Override void receiveFromIntermediary(Packet genericPacket); @Override void addDestinationToNextSwitch(int destinationId, int nextHopId); @Override String toString();  }