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