View Javadoc

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