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