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