📄 topologyfileentry.java
字号:
/* TopologyFileEntry.java * * This file contains the code for the class TopologyFileEntry * that represents an entry in the Topology Configuration File */class TopologyFileEntry { // the origin node of the edge int router1; // the destination node of the edge int router2; // the weight of the edge int weight; /* * Constructor * * @r1 the origin node @r2 the destination node @w the weight of the edge */ public TopologyFileEntry(int r1, int r2, int w) { router1 = r1; router2 = r2; weight = w; } /* * Method Name: getRouter1 * * Use: to get the origin node of the edge */ int getRouter1() { return router1; } /* * Method Name: getRouter2 * * Use: to get the destination node of the edge */ int getRouter2() { return router2; } /* * Method Name: getWeight * * Use: to get the weight of the edge */ int getWeight() { return weight; } /* * Method Name: toString * * Use: to return a textual representation of this entry */ public String toString() { return ("(" + router1 + "," + router2 + "," + weight + ")"); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -