View Javadoc

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   * A link in the navigation.
12   * 
13   * @version $Revision$ $Date$
14   */
15  @SuppressWarnings( "all" )
16  public class LinkItem
17      implements java.io.Serializable, java.lang.Cloneable
18  {
19  
20        //--------------------------/
21       //- Class/Member Variables -/
22      //--------------------------/
23  
24      /**
25       * The name to display for the link.
26       */
27      private String name;
28  
29      /**
30       * The href to use for the link.
31       */
32      private String href;
33  
34      /**
35       * The source location of an image.
36       */
37      private String img;
38  
39      /**
40       * Where to place the image regarding the displayed name (left
41       * or right).
42       */
43      private String position = "left";
44  
45      /**
46       * The alt to use for the image.
47       */
48      private String alt;
49  
50      /**
51       * The border to use for the image.
52       */
53      private String border;
54  
55      /**
56       * The width to use for the image.
57       */
58      private String width;
59  
60      /**
61       * The height to use for the image.
62       */
63      private String height;
64  
65      /**
66       * Where the new document will be displayed when the user
67       * follows a link, i.e. _blank opens the new document in a new
68       * window.
69       */
70      private String target;
71  
72  
73        //-----------/
74       //- Methods -/
75      //-----------/
76  
77      /**
78       * Method clone.
79       * 
80       * @return LinkItem
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      } //-- LinkItem clone()
96  
97      /**
98       * Method equals.
99       * 
100      * @param other
101      * @return boolean
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     } //-- boolean equals( Object )
130 
131     /**
132      * Get the alt to use for the image.
133      * 
134      * @return String
135      */
136     public String getAlt()
137     {
138         return this.alt;
139     } //-- String getAlt()
140 
141     /**
142      * Get the border to use for the image.
143      * 
144      * @return String
145      */
146     public String getBorder()
147     {
148         return this.border;
149     } //-- String getBorder()
150 
151     /**
152      * Get the height to use for the image.
153      * 
154      * @return String
155      */
156     public String getHeight()
157     {
158         return this.height;
159     } //-- String getHeight()
160 
161     /**
162      * Get the href to use for the link.
163      * 
164      * @return String
165      */
166     public String getHref()
167     {
168         return this.href;
169     } //-- String getHref()
170 
171     /**
172      * Get the source location of an image.
173      * 
174      * @return String
175      */
176     public String getImg()
177     {
178         return this.img;
179     } //-- String getImg()
180 
181     /**
182      * Get the name to display for the link.
183      * 
184      * @return String
185      */
186     public String getName()
187     {
188         return this.name;
189     } //-- String getName()
190 
191     /**
192      * Get where to place the image regarding the displayed name
193      * (left or right).
194      * 
195      * @return String
196      */
197     public String getPosition()
198     {
199         return this.position;
200     } //-- String getPosition()
201 
202     /**
203      * Get where the new document will be displayed when the user
204      * follows a link, i.e. _blank opens the new document in a new
205      * window.
206      * 
207      * @return String
208      */
209     public String getTarget()
210     {
211         return this.target;
212     } //-- String getTarget()
213 
214     /**
215      * Get the width to use for the image.
216      * 
217      * @return String
218      */
219     public String getWidth()
220     {
221         return this.width;
222     } //-- String getWidth()
223 
224     /**
225      * Method hashCode.
226      * 
227      * @return int
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     } //-- int hashCode()
245 
246     /**
247      * Set the alt to use for the image.
248      * 
249      * @param alt
250      */
251     public void setAlt( String alt )
252     {
253         this.alt = alt;
254     } //-- void setAlt( String )
255 
256     /**
257      * Set the border to use for the image.
258      * 
259      * @param border
260      */
261     public void setBorder( String border )
262     {
263         this.border = border;
264     } //-- void setBorder( String )
265 
266     /**
267      * Set the height to use for the image.
268      * 
269      * @param height
270      */
271     public void setHeight( String height )
272     {
273         this.height = height;
274     } //-- void setHeight( String )
275 
276     /**
277      * Set the href to use for the link.
278      * 
279      * @param href
280      */
281     public void setHref( String href )
282     {
283         this.href = href;
284     } //-- void setHref( String )
285 
286     /**
287      * Set the source location of an image.
288      * 
289      * @param img
290      */
291     public void setImg( String img )
292     {
293         this.img = img;
294     } //-- void setImg( String )
295 
296     /**
297      * Set the name to display for the link.
298      * 
299      * @param name
300      */
301     public void setName( String name )
302     {
303         this.name = name;
304     } //-- void setName( String )
305 
306     /**
307      * Set where to place the image regarding the displayed name
308      * (left or right).
309      * 
310      * @param position
311      */
312     public void setPosition( String position )
313     {
314         this.position = position;
315     } //-- void setPosition( String )
316 
317     /**
318      * Set where the new document will be displayed when the user
319      * follows a link, i.e. _blank opens the new document in a new
320      * window.
321      * 
322      * @param target
323      */
324     public void setTarget( String target )
325     {
326         this.target = target;
327     } //-- void setTarget( String )
328 
329     /**
330      * Set the width to use for the image.
331      * 
332      * @param width
333      */
334     public void setWidth( String width )
335     {
336         this.width = width;
337     } //-- void setWidth( String )
338 
339     /**
340      * Method toString.
341      * 
342      * @return String
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     } //-- java.lang.String toString()
386 
387 }