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