1
2
3
4
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 package org.otvl.sbxbsamp.simple;
31
32
33
34
35 /***
36 * A room in the house.
37 * @author
38 * @version
39 */
40
41
42 public class Room
43 {
44
45
46
47 /***
48 *
49 */
50 private int id;
51 /***
52 *
53 */
54 private String name;
55 /***
56 *
57 */
58 private String location;
59
60
61
62
63
64 /***
65 * The windows of the room.
66 */
67 private java.util.List windoz = new java.util.ArrayList() ;
68 /***
69 * The doors of the room.
70 */
71 private java.util.List theDoors = new java.util.ArrayList() ;
72
73
74
75
76
77
78
79
80
81
82
83
84
85 /***
86 * Returns the id.<br/>
87 *
88 * @return int
89 */
90 public int getId() {
91 int vId = id;
92 return vId;
93 }
94
95 /***
96 * Sets the id.<br/>
97 *
98 * @param id The id to set
99 */
100 public void setId(int id) {
101 this.id = id;
102 }
103
104
105
106
107 /***
108 * Returns the name.<br/>
109 *
110 * @return String
111 */
112 public String getName() {
113 String vName = name;
114 return vName;
115 }
116
117 /***
118 * Sets the name.<br/>
119 *
120 * @param name The name to set
121 */
122 public void setName(String name) {
123 this.name = name;
124 }
125
126
127
128
129 /***
130 * Returns the location.<br/>
131 *
132 * @return String
133 */
134 public String getLocation() {
135 String vLocation = location;
136 return vLocation;
137 }
138
139 /***
140 * Sets the location.<br/>
141 *
142 * @param location The location to set
143 */
144 public void setLocation(String location) {
145 this.location = location;
146 }
147
148
149
150
151
152
153
154
155
156 /***
157 * Returns a target in link windoz.<br/>
158 * The windows of the room.
159 * @param index offset in the array
160 * @return Window
161 */
162 public Window getWindoz(int index) {
163 Window vWindoz = (Window)windoz.get(index);
164 return vWindoz;
165 }
166 /***
167 * Returns an iterator for targets in links windoz
168 * @return java.util.Iterator
169 */
170 public java.util.Iterator iteratorWindoz() {
171 java.util.Iterator vIterator = windoz.iterator();
172 return vIterator;
173 }
174 /***
175 * Returns the size of the collection windoz
176 * @return int
177 */
178 public int sizeWindoz() {
179 int vSize = windoz.size();
180 return vSize;
181 }
182
183 /***
184 * Inserts a target in link windoz.<br/>
185 * The windows of the room.
186 * @param index offset in the list
187 * @param aWindow The Window to insert
188 */
189 public void addWindoz(int index, Window aWindow) {
190 this.windoz.add(index, aWindow);
191 }
192 /***
193 * Adds a target at end of link windoz.<br/>
194 * The windows of the room.
195 * @param aWindow The Window to insert
196 */
197 public void addWindoz(Window aWindow) {
198 this.windoz.add(this.windoz.size(), aWindow);
199 }
200
201 /***
202 * Removes a target in link windoz
203 * @param index offset in the list
204 */
205 public void removeWindoz(int index) {
206 this.windoz.remove(index);
207 }
208
209 /***
210 * Clears all targets in link windoz
211 */
212 public void clearWindoz() {
213 this.windoz.clear();
214 }
215
216
217
218
219
220
221 /***
222 * Returns a target in link theDoors.<br/>
223 * The doors of the room.
224 * @param index offset in the array
225 * @return Door
226 */
227 public Door getTheDoors(int index) {
228 Door vTheDoors = (Door)theDoors.get(index);
229 return vTheDoors;
230 }
231 /***
232 * Returns an iterator for targets in links theDoors
233 * @return java.util.Iterator
234 */
235 public java.util.Iterator iteratorTheDoors() {
236 java.util.Iterator vIterator = theDoors.iterator();
237 return vIterator;
238 }
239 /***
240 * Returns the size of the collection theDoors
241 * @return int
242 */
243 public int sizeTheDoors() {
244 int vSize = theDoors.size();
245 return vSize;
246 }
247
248 /***
249 * Inserts a target in link theDoors.<br/>
250 * The doors of the room.
251 * @param index offset in the list
252 * @param aDoor The Door to insert
253 */
254 public void addTheDoors(int index, Door aDoor) {
255 this.theDoors.add(index, aDoor);
256 }
257 /***
258 * Adds a target at end of link theDoors.<br/>
259 * The doors of the room.
260 * @param aDoor The Door to insert
261 */
262 public void addTheDoors(Door aDoor) {
263 this.theDoors.add(this.theDoors.size(), aDoor);
264 }
265
266 /***
267 * Removes a target in link theDoors
268 * @param index offset in the list
269 */
270 public void removeTheDoors(int index) {
271 this.theDoors.remove(index);
272 }
273
274 /***
275 * Clears all targets in link theDoors
276 */
277 public void clearTheDoors() {
278 this.theDoors.clear();
279 }
280
281
282
283
284 }