1
2
3
4
5
6
7
8
9
10
11
12 package cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands;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.*;
13
14
15
16
17
18
19
20 public class SetSendKeys
21 extends CommandMessage
22 {
23
24
25
26 public static final String PROTOTYPE =
27 " {PlayerId unreal_id} {Player text} {Send False} ";
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42 public SetSendKeys(
43 UnrealId PlayerId, String Player, Boolean Send
44 ) {
45
46 this.PlayerId = PlayerId;
47
48 this.Player = Player;
49
50 this.Send = Send;
51
52 }
53
54
55
56
57
58
59
60
61
62
63
64
65 public SetSendKeys() {
66 }
67
68
69
70
71
72
73
74 public SetSendKeys(SetSendKeys original) {
75
76 this.PlayerId = original.PlayerId;
77
78 this.Player = original.Player;
79
80 this.Send = original.Send;
81
82 }
83
84
85
86
87 protected
88 UnrealId PlayerId =
89
90 null
91 ;
92
93
94
95
96
97
98 public UnrealId getPlayerId()
99
100 {
101 return
102 PlayerId;
103 }
104
105
106
107
108
109
110
111 public SetSendKeys
112 setPlayerId(UnrealId PlayerId)
113
114 {
115 this.PlayerId = PlayerId;
116 return this;
117 }
118
119
120
121
122 protected
123 String Player =
124
125 null
126 ;
127
128
129
130
131
132
133 public String getPlayer()
134
135 {
136 return
137 Player;
138 }
139
140
141
142
143
144
145
146 public SetSendKeys
147 setPlayer(String Player)
148
149 {
150 this.Player = Player;
151 return this;
152 }
153
154
155
156
157 protected
158 Boolean Send =
159
160 null
161 ;
162
163
164
165
166
167
168 public Boolean isSend()
169
170 {
171 return
172 Send;
173 }
174
175
176
177
178
179
180
181 public SetSendKeys
182 setSend(Boolean Send)
183
184 {
185 this.Send = Send;
186 return this;
187 }
188
189 public String toString() {
190 return toMessage();
191 }
192
193 public String toHtmlString() {
194 return super.toString() + "[<br/>" +
195
196 "<b>PlayerId</b> = " +
197 String.valueOf(getPlayerId()
198 ) +
199 " <br/> " +
200
201 "<b>Player</b> = " +
202 String.valueOf(getPlayer()
203 ) +
204 " <br/> " +
205
206 "<b>Send</b> = " +
207 String.valueOf(isSend()
208 ) +
209 " <br/> " +
210
211 "<br/>]"
212 ;
213 }
214
215 public String toMessage() {
216 StringBuffer buf = new StringBuffer();
217 buf.append("SETSENDKEYS");
218
219 if (PlayerId != null) {
220 buf.append(" {PlayerId " + PlayerId.getStringId() + "}");
221 }
222
223 if (Player != null) {
224 buf.append(" {Player " + Player + "}");
225 }
226
227 if (Send != null) {
228 buf.append(" {Send " + Send + "}");
229 }
230
231 return buf.toString();
232 }
233
234
235
236
237
238 }
239