1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 package org.apache.maven.doxia.site.decoration;
25
26
27
28
29
30
31 @SuppressWarnings( "all" )
32 public class LinkItem
33 implements java.io.Serializable, java.lang.Cloneable
34 {
35
36
37
38
39
40
41
42
43 private String name;
44
45
46
47
48 private String href;
49
50
51
52
53 private String img;
54
55
56
57
58
59 private String position = "left";
60
61
62
63
64 private String alt;
65
66
67
68
69 private String border;
70
71
72
73
74 private String width;
75
76
77
78
79 private String height;
80
81
82
83
84
85
86 private String target;
87
88
89
90
91 private String title;
92
93
94
95
96
97
98
99
100
101
102
103 public LinkItem clone()
104 {
105 try
106 {
107 LinkItem copy = (LinkItem) super.clone();
108
109 return copy;
110 }
111 catch ( java.lang.Exception ex )
112 {
113 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
114 + " does not support clone()" ).initCause( ex );
115 }
116 }
117
118
119
120
121
122
123
124 public boolean equals( Object other )
125 {
126 if ( this == other )
127 {
128 return true;
129 }
130
131 if ( !( other instanceof LinkItem ) )
132 {
133 return false;
134 }
135
136 LinkItem that = (LinkItem) other;
137 boolean result = true;
138
139 result = result && ( getName() == null ? that.getName() == null : getName().equals( that.getName() ) );
140 result = result && ( getHref() == null ? that.getHref() == null : getHref().equals( that.getHref() ) );
141 result = result && ( getImg() == null ? that.getImg() == null : getImg().equals( that.getImg() ) );
142 result = result && ( getPosition() == null ? that.getPosition() == null : getPosition().equals( that.getPosition() ) );
143 result = result && ( getAlt() == null ? that.getAlt() == null : getAlt().equals( that.getAlt() ) );
144 result = result && ( getBorder() == null ? that.getBorder() == null : getBorder().equals( that.getBorder() ) );
145 result = result && ( getWidth() == null ? that.getWidth() == null : getWidth().equals( that.getWidth() ) );
146 result = result && ( getHeight() == null ? that.getHeight() == null : getHeight().equals( that.getHeight() ) );
147 result = result && ( getTarget() == null ? that.getTarget() == null : getTarget().equals( that.getTarget() ) );
148 result = result && ( getTitle() == null ? that.getTitle() == null : getTitle().equals( that.getTitle() ) );
149
150 return result;
151 }
152
153
154
155
156
157
158 public String getAlt()
159 {
160 return this.alt;
161 }
162
163
164
165
166
167
168 public String getBorder()
169 {
170 return this.border;
171 }
172
173
174
175
176
177
178 public String getHeight()
179 {
180 return this.height;
181 }
182
183
184
185
186
187
188 public String getHref()
189 {
190 return this.href;
191 }
192
193
194
195
196
197
198 public String getImg()
199 {
200 return this.img;
201 }
202
203
204
205
206
207
208 public String getName()
209 {
210 return this.name;
211 }
212
213
214
215
216
217
218
219 public String getPosition()
220 {
221 return this.position;
222 }
223
224
225
226
227
228
229
230
231 public String getTarget()
232 {
233 return this.target;
234 }
235
236
237
238
239
240
241 public String getTitle()
242 {
243 return this.title;
244 }
245
246
247
248
249
250
251 public String getWidth()
252 {
253 return this.width;
254 }
255
256
257
258
259
260
261 public int hashCode()
262 {
263 int result = 17;
264
265 result = 37 * result + ( name != null ? name.hashCode() : 0 );
266 result = 37 * result + ( href != null ? href.hashCode() : 0 );
267 result = 37 * result + ( img != null ? img.hashCode() : 0 );
268 result = 37 * result + ( position != null ? position.hashCode() : 0 );
269 result = 37 * result + ( alt != null ? alt.hashCode() : 0 );
270 result = 37 * result + ( border != null ? border.hashCode() : 0 );
271 result = 37 * result + ( width != null ? width.hashCode() : 0 );
272 result = 37 * result + ( height != null ? height.hashCode() : 0 );
273 result = 37 * result + ( target != null ? target.hashCode() : 0 );
274 result = 37 * result + ( title != null ? title.hashCode() : 0 );
275
276 return result;
277 }
278
279
280
281
282
283
284 public void setAlt( String alt )
285 {
286 this.alt = alt;
287 }
288
289
290
291
292
293
294 public void setBorder( String border )
295 {
296 this.border = border;
297 }
298
299
300
301
302
303
304 public void setHeight( String height )
305 {
306 this.height = height;
307 }
308
309
310
311
312
313
314 public void setHref( String href )
315 {
316 this.href = href;
317 }
318
319
320
321
322
323
324 public void setImg( String img )
325 {
326 this.img = img;
327 }
328
329
330
331
332
333
334 public void setName( String name )
335 {
336 this.name = name;
337 }
338
339
340
341
342
343
344
345 public void setPosition( String position )
346 {
347 this.position = position;
348 }
349
350
351
352
353
354
355
356
357 public void setTarget( String target )
358 {
359 this.target = target;
360 }
361
362
363
364
365
366
367 public void setTitle( String title )
368 {
369 this.title = title;
370 }
371
372
373
374
375
376
377 public void setWidth( String width )
378 {
379 this.width = width;
380 }
381
382
383
384
385
386
387 public java.lang.String toString()
388 {
389 StringBuilder buf = new StringBuilder( 128 );
390
391 buf.append( "name = '" );
392 buf.append( getName() );
393 buf.append( "'" );
394 buf.append( "\n" );
395 buf.append( "href = '" );
396 buf.append( getHref() );
397 buf.append( "'" );
398 buf.append( "\n" );
399 buf.append( "img = '" );
400 buf.append( getImg() );
401 buf.append( "'" );
402 buf.append( "\n" );
403 buf.append( "position = '" );
404 buf.append( getPosition() );
405 buf.append( "'" );
406 buf.append( "\n" );
407 buf.append( "alt = '" );
408 buf.append( getAlt() );
409 buf.append( "'" );
410 buf.append( "\n" );
411 buf.append( "border = '" );
412 buf.append( getBorder() );
413 buf.append( "'" );
414 buf.append( "\n" );
415 buf.append( "width = '" );
416 buf.append( getWidth() );
417 buf.append( "'" );
418 buf.append( "\n" );
419 buf.append( "height = '" );
420 buf.append( getHeight() );
421 buf.append( "'" );
422 buf.append( "\n" );
423 buf.append( "target = '" );
424 buf.append( getTarget() );
425 buf.append( "'" );
426 buf.append( "\n" );
427 buf.append( "title = '" );
428 buf.append( getTitle() );
429 buf.append( "'" );
430
431 return buf.toString();
432 }
433
434 }