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
76
77
78
79
80
81
82 public LinkItem clone()
83 {
84 try
85 {
86 LinkItem copy = (LinkItem) super.clone();
87
88 return copy;
89 }
90 catch ( java.lang.Exception ex )
91 {
92 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
93 + " does not support clone()" ).initCause( ex );
94 }
95 }
96
97
98
99
100
101
102
103 public boolean equals( Object other )
104 {
105 if ( this == other )
106 {
107 return true;
108 }
109
110 if ( !( other instanceof LinkItem ) )
111 {
112 return false;
113 }
114
115 LinkItem that = (LinkItem) other;
116 boolean result = true;
117
118 result = result && ( getName() == null ? that.getName() == null : getName().equals( that.getName() ) );
119 result = result && ( getHref() == null ? that.getHref() == null : getHref().equals( that.getHref() ) );
120 result = result && ( getImg() == null ? that.getImg() == null : getImg().equals( that.getImg() ) );
121 result = result && ( getPosition() == null ? that.getPosition() == null : getPosition().equals( that.getPosition() ) );
122 result = result && ( getAlt() == null ? that.getAlt() == null : getAlt().equals( that.getAlt() ) );
123 result = result && ( getBorder() == null ? that.getBorder() == null : getBorder().equals( that.getBorder() ) );
124 result = result && ( getWidth() == null ? that.getWidth() == null : getWidth().equals( that.getWidth() ) );
125 result = result && ( getHeight() == null ? that.getHeight() == null : getHeight().equals( that.getHeight() ) );
126 result = result && ( getTarget() == null ? that.getTarget() == null : getTarget().equals( that.getTarget() ) );
127
128 return result;
129 }
130
131
132
133
134
135
136 public String getAlt()
137 {
138 return this.alt;
139 }
140
141
142
143
144
145
146 public String getBorder()
147 {
148 return this.border;
149 }
150
151
152
153
154
155
156 public String getHeight()
157 {
158 return this.height;
159 }
160
161
162
163
164
165
166 public String getHref()
167 {
168 return this.href;
169 }
170
171
172
173
174
175
176 public String getImg()
177 {
178 return this.img;
179 }
180
181
182
183
184
185
186 public String getName()
187 {
188 return this.name;
189 }
190
191
192
193
194
195
196
197 public String getPosition()
198 {
199 return this.position;
200 }
201
202
203
204
205
206
207
208
209 public String getTarget()
210 {
211 return this.target;
212 }
213
214
215
216
217
218
219 public String getWidth()
220 {
221 return this.width;
222 }
223
224
225
226
227
228
229 public int hashCode()
230 {
231 int result = 17;
232
233 result = 37 * result + ( name != null ? name.hashCode() : 0 );
234 result = 37 * result + ( href != null ? href.hashCode() : 0 );
235 result = 37 * result + ( img != null ? img.hashCode() : 0 );
236 result = 37 * result + ( position != null ? position.hashCode() : 0 );
237 result = 37 * result + ( alt != null ? alt.hashCode() : 0 );
238 result = 37 * result + ( border != null ? border.hashCode() : 0 );
239 result = 37 * result + ( width != null ? width.hashCode() : 0 );
240 result = 37 * result + ( height != null ? height.hashCode() : 0 );
241 result = 37 * result + ( target != null ? target.hashCode() : 0 );
242
243 return result;
244 }
245
246
247
248
249
250
251 public void setAlt( String alt )
252 {
253 this.alt = alt;
254 }
255
256
257
258
259
260
261 public void setBorder( String border )
262 {
263 this.border = border;
264 }
265
266
267
268
269
270
271 public void setHeight( String height )
272 {
273 this.height = height;
274 }
275
276
277
278
279
280
281 public void setHref( String href )
282 {
283 this.href = href;
284 }
285
286
287
288
289
290
291 public void setImg( String img )
292 {
293 this.img = img;
294 }
295
296
297
298
299
300
301 public void setName( String name )
302 {
303 this.name = name;
304 }
305
306
307
308
309
310
311
312 public void setPosition( String position )
313 {
314 this.position = position;
315 }
316
317
318
319
320
321
322
323
324 public void setTarget( String target )
325 {
326 this.target = target;
327 }
328
329
330
331
332
333
334 public void setWidth( String width )
335 {
336 this.width = width;
337 }
338
339
340
341
342
343
344 public java.lang.String toString()
345 {
346 StringBuilder buf = new StringBuilder( 128 );
347
348 buf.append( "name = '" );
349 buf.append( getName() );
350 buf.append( "'" );
351 buf.append( "\n" );
352 buf.append( "href = '" );
353 buf.append( getHref() );
354 buf.append( "'" );
355 buf.append( "\n" );
356 buf.append( "img = '" );
357 buf.append( getImg() );
358 buf.append( "'" );
359 buf.append( "\n" );
360 buf.append( "position = '" );
361 buf.append( getPosition() );
362 buf.append( "'" );
363 buf.append( "\n" );
364 buf.append( "alt = '" );
365 buf.append( getAlt() );
366 buf.append( "'" );
367 buf.append( "\n" );
368 buf.append( "border = '" );
369 buf.append( getBorder() );
370 buf.append( "'" );
371 buf.append( "\n" );
372 buf.append( "width = '" );
373 buf.append( getWidth() );
374 buf.append( "'" );
375 buf.append( "\n" );
376 buf.append( "height = '" );
377 buf.append( getHeight() );
378 buf.append( "'" );
379 buf.append( "\n" );
380 buf.append( "target = '" );
381 buf.append( getTarget() );
382 buf.append( "'" );
383
384 return buf.toString();
385 }
386
387 }