source: tmcsimulator/branches/trunk/src/tmcsim/simulationmanager/model/AppliedDiversionTableItem.java @ 82

Revision 82, 1002 bytes checked in by jtorres, 9 years ago (diff)

Added socket client to ATMSDriver. Added socket server to FEPSim

Line 
1package tmcsim.simulationmanager.model;
2
3/**
4 * Container class to hold information displayed in the table.
5 * @author Matthew Cechini
6 */
7public class AppliedDiversionTableItem implements
8        Comparable<AppliedDiversionTableItem> {
9
10    public String cmsID;
11
12    public String originalPath;
13
14    public String newPath;
15
16    public Integer currentDiv;
17
18    public Long timeApplied;
19   
20   
21    public AppliedDiversionTableItem(String id, String oPath, String nPath,
22            Integer div, Long time) {
23        cmsID = id;
24        originalPath = oPath;
25        newPath = nPath;
26        currentDiv = div;
27        timeApplied = time;
28    }
29
30    public int compareTo(AppliedDiversionTableItem arg) {
31
32        if (cmsID.equals(arg.cmsID)) {
33            if (originalPath.equals(arg.originalPath)) {
34                return newPath.compareTo(arg.newPath);
35            }
36            return originalPath.compareTo(arg.originalPath);
37        } else
38            return cmsID.compareTo(arg.cmsID);
39    }
40}
Note: See TracBrowser for help on using the repository browser.