@Test public void testToString() { System.out.println(device4identity.toString()); }
@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("\n\nRangeValiantEcmpSwitch<id=" + getIdentifier() + ", connected=" + connectedTo + ",\nrouting:\n"); for (int i = 0; i < destinationToNextSwitch.size(); i++) { builder.append("\tfor " + i + " next hops are " + destinationToNextSwitch.get(i) + "\n"); } builder.append(",\ninclusive valiant range: [" + lowBoundValiantRangeIncl + ", " + highBoundValiantRangeIncl + "]\n"); builder.append(">\n\n"); return builder.toString(); }
RangeValiantSwitch extends ValiantEcmpSwitch { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("\n\nRangeValiantEcmpSwitch<id=" + getIdentifier() + ", connected=" + connectedTo + ",\nrouting:\n"); for (int i = 0; i < destinationToNextSwitch.size(); i++) { builder.append("\tfor " + i + " next hops are " + destinationToNextSwitch.get(i) + "\n"); } builder.append(",\ninclusive valiant range: [" + lowBoundValiantRangeIncl + ", " + highBoundValiantRangeIncl + "]\n"); builder.append(">\n\n"); return builder.toString(); } }
RangeValiantSwitch extends ValiantEcmpSwitch { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("\n\nRangeValiantEcmpSwitch<id=" + getIdentifier() + ", connected=" + connectedTo + ",\nrouting:\n"); for (int i = 0; i < destinationToNextSwitch.size(); i++) { builder.append("\tfor " + i + " next hops are " + destinationToNextSwitch.get(i) + "\n"); } builder.append(",\ninclusive valiant range: [" + lowBoundValiantRangeIncl + ", " + highBoundValiantRangeIncl + "]\n"); builder.append(">\n\n"); return builder.toString(); } RangeValiantSwitch(int identifier, TransportLayer transportLayer, int n, Intermediary intermediary, int lowBoundValiantRangeIncl, int highBoundValiantRangeIncl); }
RangeValiantSwitch extends ValiantEcmpSwitch { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("\n\nRangeValiantEcmpSwitch<id=" + getIdentifier() + ", connected=" + connectedTo + ",\nrouting:\n"); for (int i = 0; i < destinationToNextSwitch.size(); i++) { builder.append("\tfor " + i + " next hops are " + destinationToNextSwitch.get(i) + "\n"); } builder.append(",\ninclusive valiant range: [" + lowBoundValiantRangeIncl + ", " + highBoundValiantRangeIncl + "]\n"); builder.append(">\n\n"); return builder.toString(); } RangeValiantSwitch(int identifier, TransportLayer transportLayer, int n, Intermediary intermediary, int lowBoundValiantRangeIncl, int highBoundValiantRangeIncl); @Override void receiveFromIntermediary(Packet genericPacket); @Override String toString(); }
RangeValiantSwitch extends ValiantEcmpSwitch { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("\n\nRangeValiantEcmpSwitch<id=" + getIdentifier() + ", connected=" + connectedTo + ",\nrouting:\n"); for (int i = 0; i < destinationToNextSwitch.size(); i++) { builder.append("\tfor " + i + " next hops are " + destinationToNextSwitch.get(i) + "\n"); } builder.append(",\ninclusive valiant range: [" + lowBoundValiantRangeIncl + ", " + highBoundValiantRangeIncl + "]\n"); builder.append(">\n\n"); return builder.toString(); } RangeValiantSwitch(int identifier, TransportLayer transportLayer, int n, Intermediary intermediary, int lowBoundValiantRangeIncl, int highBoundValiantRangeIncl); @Override void receiveFromIntermediary(Packet genericPacket); @Override String toString();  }