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