Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Banner |
|
| 2.5555555555555554;2,556 |
1 | /* | |
2 | =================== DO NOT EDIT THIS FILE ==================== | |
3 | Generated by Modello 1.4.1 on 2011-04-27 00:03:43, | |
4 | any modifications will be overwritten. | |
5 | ============================================================== | |
6 | */ | |
7 | ||
8 | package org.apache.maven.doxia.site.decoration; | |
9 | ||
10 | /** | |
11 | * Banner logo on the masthead of the site. | |
12 | * | |
13 | * @version $Revision$ $Date$ | |
14 | */ | |
15 | @SuppressWarnings( "all" ) | |
16 | 396 | public class Banner |
17 | implements java.io.Serializable, java.lang.Cloneable | |
18 | { | |
19 | ||
20 | //--------------------------/ | |
21 | //- Class/Member Variables -/ | |
22 | //--------------------------/ | |
23 | ||
24 | /** | |
25 | * The name of the banner. | |
26 | */ | |
27 | private String name; | |
28 | ||
29 | /** | |
30 | * The source location of an image for the banner. | |
31 | */ | |
32 | private String src; | |
33 | ||
34 | /** | |
35 | * The alt description for the banner image. | |
36 | */ | |
37 | private String alt; | |
38 | ||
39 | /** | |
40 | * The href of a link to be used for the banner image. | |
41 | */ | |
42 | private String href; | |
43 | ||
44 | /** | |
45 | * The border to use for the banner image. | |
46 | */ | |
47 | private String border; | |
48 | ||
49 | /** | |
50 | * The width to use for the banner image. | |
51 | */ | |
52 | private String width; | |
53 | ||
54 | /** | |
55 | * The height to use for the banner image. | |
56 | */ | |
57 | private String height; | |
58 | ||
59 | ||
60 | //-----------/ | |
61 | //- Methods -/ | |
62 | //-----------/ | |
63 | ||
64 | /** | |
65 | * Method clone. | |
66 | * | |
67 | * @return Banner | |
68 | */ | |
69 | public Banner clone() | |
70 | { | |
71 | try | |
72 | { | |
73 | 216 | Banner copy = (Banner) super.clone(); |
74 | ||
75 | 216 | return copy; |
76 | } | |
77 | 0 | catch ( java.lang.Exception ex ) |
78 | { | |
79 | 0 | throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() |
80 | + " does not support clone()" ).initCause( ex ); | |
81 | } | |
82 | } //-- Banner clone() | |
83 | ||
84 | /** | |
85 | * Method equals. | |
86 | * | |
87 | * @param other | |
88 | * @return boolean | |
89 | */ | |
90 | public boolean equals( Object other ) | |
91 | { | |
92 | 246 | if ( this == other ) |
93 | { | |
94 | 0 | return true; |
95 | } | |
96 | ||
97 | 246 | if ( !( other instanceof Banner ) ) |
98 | { | |
99 | 0 | return false; |
100 | } | |
101 | ||
102 | 246 | Banner that = (Banner) other; |
103 | 246 | boolean result = true; |
104 | ||
105 | 246 | result = result && ( getName() == null ? that.getName() == null : getName().equals( that.getName() ) ); |
106 | 246 | result = result && ( getSrc() == null ? that.getSrc() == null : getSrc().equals( that.getSrc() ) ); |
107 | 246 | result = result && ( getAlt() == null ? that.getAlt() == null : getAlt().equals( that.getAlt() ) ); |
108 | 246 | result = result && ( getHref() == null ? that.getHref() == null : getHref().equals( that.getHref() ) ); |
109 | 246 | result = result && ( getBorder() == null ? that.getBorder() == null : getBorder().equals( that.getBorder() ) ); |
110 | 246 | result = result && ( getWidth() == null ? that.getWidth() == null : getWidth().equals( that.getWidth() ) ); |
111 | 246 | result = result && ( getHeight() == null ? that.getHeight() == null : getHeight().equals( that.getHeight() ) ); |
112 | ||
113 | 246 | return result; |
114 | } //-- boolean equals( Object ) | |
115 | ||
116 | /** | |
117 | * Get the alt description for the banner image. | |
118 | * | |
119 | * @return String | |
120 | */ | |
121 | public String getAlt() | |
122 | { | |
123 | 498 | return this.alt; |
124 | } //-- String getAlt() | |
125 | ||
126 | /** | |
127 | * Get the border to use for the banner image. | |
128 | * | |
129 | * @return String | |
130 | */ | |
131 | public String getBorder() | |
132 | { | |
133 | 492 | return this.border; |
134 | } //-- String getBorder() | |
135 | ||
136 | /** | |
137 | * Get the height to use for the banner image. | |
138 | * | |
139 | * @return String | |
140 | */ | |
141 | public String getHeight() | |
142 | { | |
143 | 492 | return this.height; |
144 | } //-- String getHeight() | |
145 | ||
146 | /** | |
147 | * Get the href of a link to be used for the banner image. | |
148 | * | |
149 | * @return String | |
150 | */ | |
151 | public String getHref() | |
152 | { | |
153 | 1422 | return this.href; |
154 | } //-- String getHref() | |
155 | ||
156 | /** | |
157 | * Get the name of the banner. | |
158 | * | |
159 | * @return String | |
160 | */ | |
161 | public String getName() | |
162 | { | |
163 | 738 | return this.name; |
164 | } //-- String getName() | |
165 | ||
166 | /** | |
167 | * Get the source location of an image for the banner. | |
168 | * | |
169 | * @return String | |
170 | */ | |
171 | public String getSrc() | |
172 | { | |
173 | 1398 | return this.src; |
174 | } //-- String getSrc() | |
175 | ||
176 | /** | |
177 | * Get the width to use for the banner image. | |
178 | * | |
179 | * @return String | |
180 | */ | |
181 | public String getWidth() | |
182 | { | |
183 | 492 | return this.width; |
184 | } //-- String getWidth() | |
185 | ||
186 | /** | |
187 | * Method hashCode. | |
188 | * | |
189 | * @return int | |
190 | */ | |
191 | public int hashCode() | |
192 | { | |
193 | 0 | int result = 17; |
194 | ||
195 | 0 | result = 37 * result + ( name != null ? name.hashCode() : 0 ); |
196 | 0 | result = 37 * result + ( src != null ? src.hashCode() : 0 ); |
197 | 0 | result = 37 * result + ( alt != null ? alt.hashCode() : 0 ); |
198 | 0 | result = 37 * result + ( href != null ? href.hashCode() : 0 ); |
199 | 0 | result = 37 * result + ( border != null ? border.hashCode() : 0 ); |
200 | 0 | result = 37 * result + ( width != null ? width.hashCode() : 0 ); |
201 | 0 | result = 37 * result + ( height != null ? height.hashCode() : 0 ); |
202 | ||
203 | 0 | return result; |
204 | } //-- int hashCode() | |
205 | ||
206 | /** | |
207 | * Set the alt description for the banner image. | |
208 | * | |
209 | * @param alt | |
210 | */ | |
211 | public void setAlt( String alt ) | |
212 | { | |
213 | 12 | this.alt = alt; |
214 | 12 | } //-- void setAlt( String ) |
215 | ||
216 | /** | |
217 | * Set the border to use for the banner image. | |
218 | * | |
219 | * @param border | |
220 | */ | |
221 | public void setBorder( String border ) | |
222 | { | |
223 | 0 | this.border = border; |
224 | 0 | } //-- void setBorder( String ) |
225 | ||
226 | /** | |
227 | * Set the height to use for the banner image. | |
228 | * | |
229 | * @param height | |
230 | */ | |
231 | public void setHeight( String height ) | |
232 | { | |
233 | 0 | this.height = height; |
234 | 0 | } //-- void setHeight( String ) |
235 | ||
236 | /** | |
237 | * Set the href of a link to be used for the banner image. | |
238 | * | |
239 | * @param href | |
240 | */ | |
241 | public void setHref( String href ) | |
242 | { | |
243 | 702 | this.href = href; |
244 | 702 | } //-- void setHref( String ) |
245 | ||
246 | /** | |
247 | * Set the name of the banner. | |
248 | * | |
249 | * @param name | |
250 | */ | |
251 | public void setName( String name ) | |
252 | { | |
253 | 396 | this.name = name; |
254 | 396 | } //-- void setName( String ) |
255 | ||
256 | /** | |
257 | * Set the source location of an image for the banner. | |
258 | * | |
259 | * @param src | |
260 | */ | |
261 | public void setSrc( String src ) | |
262 | { | |
263 | 672 | this.src = src; |
264 | 672 | } //-- void setSrc( String ) |
265 | ||
266 | /** | |
267 | * Set the width to use for the banner image. | |
268 | * | |
269 | * @param width | |
270 | */ | |
271 | public void setWidth( String width ) | |
272 | { | |
273 | 0 | this.width = width; |
274 | 0 | } //-- void setWidth( String ) |
275 | ||
276 | /** | |
277 | * Method toString. | |
278 | * | |
279 | * @return String | |
280 | */ | |
281 | public java.lang.String toString() | |
282 | { | |
283 | 0 | StringBuilder buf = new StringBuilder( 128 ); |
284 | ||
285 | 0 | buf.append( "name = '" ); |
286 | 0 | buf.append( getName() ); |
287 | 0 | buf.append( "'" ); |
288 | 0 | buf.append( "\n" ); |
289 | 0 | buf.append( "src = '" ); |
290 | 0 | buf.append( getSrc() ); |
291 | 0 | buf.append( "'" ); |
292 | 0 | buf.append( "\n" ); |
293 | 0 | buf.append( "alt = '" ); |
294 | 0 | buf.append( getAlt() ); |
295 | 0 | buf.append( "'" ); |
296 | 0 | buf.append( "\n" ); |
297 | 0 | buf.append( "href = '" ); |
298 | 0 | buf.append( getHref() ); |
299 | 0 | buf.append( "'" ); |
300 | 0 | buf.append( "\n" ); |
301 | 0 | buf.append( "border = '" ); |
302 | 0 | buf.append( getBorder() ); |
303 | 0 | buf.append( "'" ); |
304 | 0 | buf.append( "\n" ); |
305 | 0 | buf.append( "width = '" ); |
306 | 0 | buf.append( getWidth() ); |
307 | 0 | buf.append( "'" ); |
308 | 0 | buf.append( "\n" ); |
309 | 0 | buf.append( "height = '" ); |
310 | 0 | buf.append( getHeight() ); |
311 | 0 | buf.append( "'" ); |
312 | ||
313 | 0 | return buf.toString(); |
314 | } //-- java.lang.String toString() | |
315 | ||
316 | } |