1 package cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages;
2
3
4 import java.util.*;import javax.vecmath.*;import cz.cuni.amis.pogamut.base.communication.messages.*;import cz.cuni.amis.pogamut.base.communication.worldview.*;import cz.cuni.amis.pogamut.base.communication.worldview.event.*;import cz.cuni.amis.pogamut.base.communication.worldview.object.*;import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;import cz.cuni.amis.pogamut.base.communication.translator.event.*;import cz.cuni.amis.pogamut.multi.communication.translator.event.*;import cz.cuni.amis.pogamut.base3d.worldview.object.*;import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.*;import cz.cuni.amis.pogamut.ut2004.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType.Category;import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;import cz.cuni.amis.utils.exception.*;import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;import cz.cuni.amis.utils.SafeEquals;import cz.cuni.amis.pogamut.base.agent.*;import cz.cuni.amis.pogamut.multi.agent.*;import cz.cuni.amis.pogamut.multi.communication.worldview.property.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.property.*;import cz.cuni.amis.utils.token.*;import cz.cuni.amis.utils.*;
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 public class EnteredVehicle
31 extends InfoMessage
32 implements IWorldEvent, IWorldChangeEvent
33
34 {
35
36
37 public static final String PROTOTYPE =
38 "ENTERED {Id unreal_id} {Type text} {Location 0,0,0} ";
39
40
41
42
43
44
45 public EnteredVehicle()
46 {
47 }
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79 public EnteredVehicle(
80 UnrealId Id, String Type, Location Location
81 ) {
82
83 this.Id = Id;
84
85 this.Type = Type;
86
87 this.Location = Location;
88
89 }
90
91
92
93
94
95
96 public EnteredVehicle(EnteredVehicle original) {
97
98 this.Id = original.getId()
99 ;
100
101 this.Type = original.getType()
102 ;
103
104 this.Location = original.getLocation()
105 ;
106
107 this.SimTime = original.getSimTime();
108 }
109
110
111 protected long SimTime;
112
113
114
115
116 @Override
117 public long getSimTime() {
118 return SimTime;
119 }
120
121
122
123
124 protected void setSimTime(long SimTime) {
125 this.SimTime = SimTime;
126 }
127
128
129
130
131
132 protected
133 UnrealId Id =
134 null;
135
136
137
138
139 public UnrealId getId()
140 {
141 return Id;
142 }
143
144
145
146
147
148 protected
149 String Type =
150 null;
151
152
153
154
155 public String getType()
156 {
157 return Type;
158 }
159
160
161
162
163
164 protected
165 Location Location =
166 null;
167
168
169
170
171 public Location getLocation()
172 {
173 return Location;
174 }
175
176
177 public String toString() {
178 return
179 super.toString() + "[" +
180
181 "Id = " + String.valueOf(getId()
182 ) + " | " +
183
184 "Type = " + String.valueOf(getType()
185 ) + " | " +
186
187 "Location = " + String.valueOf(getLocation()
188 ) + " | " +
189
190 "]";
191 }
192
193
194 public String toHtmlString() {
195 return super.toString() + "[<br/>" +
196
197 "<b>Id</b> = " + String.valueOf(getId()
198 ) + " <br/> " +
199
200 "<b>Type</b> = " + String.valueOf(getType()
201 ) + " <br/> " +
202
203 "<b>Location</b> = " + String.valueOf(getLocation()
204 ) + " <br/> " +
205
206 "<br/>]";
207 }
208
209 public String toJsonLiteral() {
210 return "EnteredVehicle(null, "
211
212 + ")";
213 }
214
215
216
217
218
219
220
221
222
223
224 }
225