1   package de.uni_stuttgart.informatik.canu.mobisim.notifications;
2   
3   import de.uni_stuttgart.informatik.canu.mobisim.core.Notification;
4   
5   /**
6    * This user-defined Java class extends the functionality of Notification Java class. 
7    * It is used to contain information about the vehicles within range and setters getters for those parameters. 
8    * @author prajakta
9    *
10   */
11  public class VehiclesInRangeNotification extends Notification{
12  
13      private String owner;
14      private String communID;
15      private boolean lockFlag = false;
16      
17      
18      private String yCoord = null;
19      public String getYCoord() {
20          return yCoord;
21      }
22  
23  
24      public void setYCoord(String yCoord) {
25          this.yCoord = yCoord;
26      }
27  
28      private String xCoord = null;
29      public String getXCoord() {
30          return xCoord;
31      }
32  
33  
34      public void setXCoord(String xCoord) {
35          this.xCoord = xCoord;
36      }
37      
38      //new code
39      private boolean rngChng = false;
40      
41      public boolean isRngChng() {
42          return rngChng;
43      }
44  
45  
46      public void setRngChng(boolean rngChng) {
47          this.rngChng = rngChng;
48      }
49      //new code
50  
51      public boolean isLockFlag() {
52          return lockFlag;
53      }
54  
55  
56      public void setLockFlag(boolean lockFlag) {
57          this.lockFlag = lockFlag;
58      }
59  
60  
61      public VehiclesInRangeNotification()
62      {
63          
64      }
65      
66      
67      public String getCommunID() {
68          return communID;
69      }
70  
71      public void setCommunID(String communID) {
72          this.communID = communID;
73      }
74  
75      public String getVehicles() {
76          return vehicles;
77      }
78  
79      public void setVehicles(String vehicles) {
80          this.vehicles = vehicles;
81      }
82  
83      private String vehicles;
84      public String getOwner() {
85          return owner;
86      }
87  
88      public String getNode() {
89          return node;
90      }
91  
92      private String node;
93      
94      
95      private boolean onCommonSegment = false;
96      
97      
98      
99      public boolean isOnCommonSegment() {
100         
101         return onCommonSegment;
102     }
103 
104 
105     public void setOnCommonSegment(boolean onCommonSegment) {
106         this.onCommonSegment = onCommonSegment;
107     }
108 
109     
110         
111     public VehiclesInRangeNotification(Object sender, Object receiver, String ownerID, String commID, String vehicles,boolean rngChng,boolean lockFlag,boolean onCommonSeg,String yCoordinates,String xCoordinates) {
112         super(sender, receiver);
113         setOwner(ownerID);
114         setCommunID(commID);
115         setVehicles(vehicles);
116         setLockFlag(lockFlag);
117         //new code
118         setRngChng(rngChng);
119         //new code
120         setOnCommonSegment(onCommonSeg);
121         setYCoord(yCoordinates);
122         setXCoord(xCoordinates);
123         
124     }
125 
126     public void setOwner(String owner) {
127         this.owner = owner; 
128         
129     }
130 
131     public void setNode(String node) {
132         this.node = node;
133     }
134     
135     
136     public String toString(){
137         return "";
138     }
139 
140 }
141