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