1 /* 2 Licensed to the Apache Software Foundation (ASF) under one 3 or more contributor license agreements. See the NOTICE file 4 distributed with this work for additional information 5 regarding copyright ownership. The ASF licenses this file 6 to you under the Apache License, Version 2.0 (the 7 "License"); you may not use this file except in compliance 8 with the License. You may obtain a copy of the License at 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 12 Unless required by applicable law or agreed to in writing, 13 software distributed under the License is distributed on an 14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 KIND, either express or implied. See the License for the 16 specific language governing permissions and limitations 17 under the License. 18 =================== DO NOT EDIT THIS FILE ==================== 19 Generated by Modello 2.5.1, 20 any modifications will be overwritten. 21 ============================================================== 22 */ 23 24 package org.apache.maven.doxia.site; 25 26 /** 27 * An image. Generates an "img" element 28 * (https://html.spec.whatwg.org/#the-img-element). 29 * 30 * @version $Revision$ $Date$ 31 */ 32 @SuppressWarnings( "all" ) 33 public class Image 34 implements java.io.Serializable, java.lang.Cloneable 35 { 36 37 //--------------------------/ 38 //- Class/Member Variables -/ 39 //--------------------------/ 40 41 /** 42 * The source location. Ends up in the "img src" attribute 43 * (https://html.spec.whatwg.org/#attr-img-src). 44 */ 45 private String src; 46 47 /** 48 * Where to place the image relative to the displayed name 49 * (left or right). 50 */ 51 private String position = "left"; 52 53 /** 54 * The alternative text to use. Ends up in the "img alt" 55 * attribute (https://html.spec.whatwg.org/#alt).(. 56 */ 57 private String alt; 58 59 /** 60 * The width to use. Added to the generated "img style" 61 * attribute 62 * (https://html.spec.whatwg.org/#the-style-attribute) prefixed 63 * by "width: ". 64 */ 65 private String width; 66 67 /** 68 * The height to use. Added to the generated "img style" 69 * attribute 70 * (https://html.spec.whatwg.org/#the-style-attribute) prefixed 71 * by "height: ". 72 */ 73 private String height; 74 75 /** 76 * The style to use. Ends up in the "img style" attribute 77 * (https://html.spec.whatwg.org/#the-style-attribute) as is. 78 */ 79 private String style; 80 81 82 //-----------/ 83 //- Methods -/ 84 //-----------/ 85 86 /** 87 * Method clone. 88 * 89 * @return Image 90 */ 91 public Image clone() 92 { 93 try 94 { 95 Image copy = (Image) super.clone(); 96 97 return copy; 98 } 99 catch ( java.lang.Exception ex ) 100 { 101 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() 102 + " does not support clone()" ).initCause( ex ); 103 } 104 } //-- Image clone() 105 106 /** 107 * Method equals. 108 * 109 * @param other a other object. 110 * @return boolean 111 */ 112 public boolean equals( Object other ) 113 { 114 if ( this == other ) 115 { 116 return true; 117 } 118 119 if ( !( other instanceof Image ) ) 120 { 121 return false; 122 } 123 124 Image that = (Image) other; 125 boolean result = true; 126 127 result = result && ( getSrc() == null ? that.getSrc() == null : getSrc().equals( that.getSrc() ) ); 128 result = result && ( getPosition() == null ? that.getPosition() == null : getPosition().equals( that.getPosition() ) ); 129 result = result && ( getAlt() == null ? that.getAlt() == null : getAlt().equals( that.getAlt() ) ); 130 result = result && ( getWidth() == null ? that.getWidth() == null : getWidth().equals( that.getWidth() ) ); 131 result = result && ( getHeight() == null ? that.getHeight() == null : getHeight().equals( that.getHeight() ) ); 132 result = result && ( getStyle() == null ? that.getStyle() == null : getStyle().equals( that.getStyle() ) ); 133 134 return result; 135 } //-- boolean equals( Object ) 136 137 /** 138 * Get the alternative text to use. Ends up in the "img alt" 139 * attribute (https://html.spec.whatwg.org/#alt).(. 140 * 141 * @return String 142 */ 143 public String getAlt() 144 { 145 return this.alt; 146 } //-- String getAlt() 147 148 /** 149 * Get the height to use. Added to the generated "img style" 150 * attribute 151 * (https://html.spec.whatwg.org/#the-style-attribute) prefixed 152 * by "height: ". 153 * 154 * @return String 155 */ 156 public String getHeight() 157 { 158 return this.height; 159 } //-- String getHeight() 160 161 /** 162 * Get where to place the image relative to the displayed name 163 * (left or right). 164 * 165 * @return String 166 */ 167 public String getPosition() 168 { 169 return this.position; 170 } //-- String getPosition() 171 172 /** 173 * Get the source location. Ends up in the "img src" attribute 174 * (https://html.spec.whatwg.org/#attr-img-src). 175 * 176 * @return String 177 */ 178 public String getSrc() 179 { 180 return this.src; 181 } //-- String getSrc() 182 183 /** 184 * Get the style to use. Ends up in the "img style" attribute 185 * (https://html.spec.whatwg.org/#the-style-attribute) as is. 186 * 187 * @return String 188 */ 189 public String getStyle() 190 { 191 return this.style; 192 } //-- String getStyle() 193 194 /** 195 * Get the width to use. Added to the generated "img style" 196 * attribute 197 * (https://html.spec.whatwg.org/#the-style-attribute) prefixed 198 * by "width: ". 199 * 200 * @return String 201 */ 202 public String getWidth() 203 { 204 return this.width; 205 } //-- String getWidth() 206 207 /** 208 * Method hashCode. 209 * 210 * @return int 211 */ 212 public int hashCode() 213 { 214 int result = 17; 215 216 result = 37 * result + ( src != null ? src.hashCode() : 0 ); 217 result = 37 * result + ( position != null ? position.hashCode() : 0 ); 218 result = 37 * result + ( alt != null ? alt.hashCode() : 0 ); 219 result = 37 * result + ( width != null ? width.hashCode() : 0 ); 220 result = 37 * result + ( height != null ? height.hashCode() : 0 ); 221 result = 37 * result + ( style != null ? style.hashCode() : 0 ); 222 223 return result; 224 } //-- int hashCode() 225 226 /** 227 * Set the alternative text to use. Ends up in the "img alt" 228 * attribute (https://html.spec.whatwg.org/#alt).(. 229 * 230 * @param alt a alt object. 231 */ 232 public void setAlt( String alt ) 233 { 234 this.alt = alt; 235 } //-- void setAlt( String ) 236 237 /** 238 * Set the height to use. Added to the generated "img style" 239 * attribute 240 * (https://html.spec.whatwg.org/#the-style-attribute) prefixed 241 * by "height: ". 242 * 243 * @param height a height object. 244 */ 245 public void setHeight( String height ) 246 { 247 this.height = height; 248 } //-- void setHeight( String ) 249 250 /** 251 * Set where to place the image relative to the displayed name 252 * (left or right). 253 * 254 * @param position a position object. 255 */ 256 public void setPosition( String position ) 257 { 258 this.position = position; 259 } //-- void setPosition( String ) 260 261 /** 262 * Set the source location. Ends up in the "img src" attribute 263 * (https://html.spec.whatwg.org/#attr-img-src). 264 * 265 * @param src a src object. 266 */ 267 public void setSrc( String src ) 268 { 269 this.src = src; 270 } //-- void setSrc( String ) 271 272 /** 273 * Set the style to use. Ends up in the "img style" attribute 274 * (https://html.spec.whatwg.org/#the-style-attribute) as is. 275 * 276 * @param style a style object. 277 */ 278 public void setStyle( String style ) 279 { 280 this.style = style; 281 } //-- void setStyle( String ) 282 283 /** 284 * Set the width to use. Added to the generated "img style" 285 * attribute 286 * (https://html.spec.whatwg.org/#the-style-attribute) prefixed 287 * by "width: ". 288 * 289 * @param width a width object. 290 */ 291 public void setWidth( String width ) 292 { 293 this.width = width; 294 } //-- void setWidth( String ) 295 296 /** 297 * Method toString. 298 * 299 * @return String 300 */ 301 public java.lang.String toString() 302 { 303 StringBuilder buf = new StringBuilder( 128 ); 304 305 buf.append( "src = '" ); 306 buf.append( getSrc() ); 307 buf.append( "'" ); 308 buf.append( "\n" ); 309 buf.append( "position = '" ); 310 buf.append( getPosition() ); 311 buf.append( "'" ); 312 buf.append( "\n" ); 313 buf.append( "alt = '" ); 314 buf.append( getAlt() ); 315 buf.append( "'" ); 316 buf.append( "\n" ); 317 buf.append( "width = '" ); 318 buf.append( getWidth() ); 319 buf.append( "'" ); 320 buf.append( "\n" ); 321 buf.append( "height = '" ); 322 buf.append( getHeight() ); 323 buf.append( "'" ); 324 buf.append( "\n" ); 325 buf.append( "style = '" ); 326 buf.append( getStyle() ); 327 buf.append( "'" ); 328 329 return buf.toString(); 330 } //-- java.lang.String toString() 331 332 }