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   * 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       * Where the new document will be displayed when the user
39       * follows a link, i.e. _blank opens the new document in a new
40       * window.
41       */
42      private String target;
43  
44      /**
45       * The image for the link.
46       */
47      private Image image;
48  
49  
50        //-----------/
51       //- Methods -/
52      //-----------/
53  
54      /**
55       * Method clone.
56       * 
57       * @return LinkItem
58       */
59      public LinkItem clone()
60      {
61          try
62          {
63              LinkItem copy = (LinkItem) super.clone();
64  
65              if ( this.image != null )
66              {
67                  copy.image = (Image) this.image.clone();
68              }
69  
70              return copy;
71          }
72          catch ( java.lang.Exception ex )
73          {
74              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
75                  + " does not support clone()" ).initCause( ex );
76          }
77      } //-- LinkItem clone()
78  
79      /**
80       * Method equals.
81       * 
82       * @param other a other object.
83       * @return boolean
84       */
85      public boolean equals( Object other )
86      {
87          if ( this == other )
88          {
89              return true;
90          }
91  
92          if ( !( other instanceof LinkItem ) )
93          {
94              return false;
95          }
96  
97          LinkItem that = (LinkItem) other;
98          boolean result = true;
99  
100         result = result && ( getName() == null ? that.getName() == null : getName().equals( that.getName() ) );
101         result = result && ( getHref() == null ? that.getHref() == null : getHref().equals( that.getHref() ) );
102         result = result && ( getTarget() == null ? that.getTarget() == null : getTarget().equals( that.getTarget() ) );
103         result = result && ( getImage() == null ? that.getImage() == null : getImage().equals( that.getImage() ) );
104 
105         return result;
106     } //-- boolean equals( Object )
107 
108     /**
109      * Get the href to use for the link.
110      * 
111      * @return String
112      */
113     public String getHref()
114     {
115         return this.href;
116     } //-- String getHref()
117 
118     /**
119      * Get the image for the link.
120      * 
121      * @return Image
122      */
123     public Image getImage()
124     {
125         return this.image;
126     } //-- Image getImage()
127 
128     /**
129      * Get the name to display for the link.
130      * 
131      * @return String
132      */
133     public String getName()
134     {
135         return this.name;
136     } //-- String getName()
137 
138     /**
139      * Get where the new document will be displayed when the user
140      * follows a link, i.e. _blank opens the new document in a new
141      * window.
142      * 
143      * @return String
144      */
145     public String getTarget()
146     {
147         return this.target;
148     } //-- String getTarget()
149 
150     /**
151      * Method hashCode.
152      * 
153      * @return int
154      */
155     public int hashCode()
156     {
157         int result = 17;
158 
159         result = 37 * result + ( name != null ? name.hashCode() : 0 );
160         result = 37 * result + ( href != null ? href.hashCode() : 0 );
161         result = 37 * result + ( target != null ? target.hashCode() : 0 );
162         result = 37 * result + ( image != null ? image.hashCode() : 0 );
163 
164         return result;
165     } //-- int hashCode()
166 
167     /**
168      * Set the href to use for the link.
169      * 
170      * @param href a href object.
171      */
172     public void setHref( String href )
173     {
174         this.href = href;
175     } //-- void setHref( String )
176 
177     /**
178      * Set the image for the link.
179      * 
180      * @param image a image object.
181      */
182     public void setImage( Image image )
183     {
184         this.image = image;
185     } //-- void setImage( Image )
186 
187     /**
188      * Set the name to display for the link.
189      * 
190      * @param name a name object.
191      */
192     public void setName( String name )
193     {
194         this.name = name;
195     } //-- void setName( String )
196 
197     /**
198      * Set where the new document will be displayed when the user
199      * follows a link, i.e. _blank opens the new document in a new
200      * window.
201      * 
202      * @param target a target object.
203      */
204     public void setTarget( String target )
205     {
206         this.target = target;
207     } //-- void setTarget( String )
208 
209     /**
210      * Method toString.
211      * 
212      * @return String
213      */
214     public java.lang.String toString()
215     {
216         StringBuilder buf = new StringBuilder( 128 );
217 
218         buf.append( "name = '" );
219         buf.append( getName() );
220         buf.append( "'" );
221         buf.append( "\n" ); 
222         buf.append( "href = '" );
223         buf.append( getHref() );
224         buf.append( "'" );
225         buf.append( "\n" ); 
226         buf.append( "target = '" );
227         buf.append( getTarget() );
228         buf.append( "'" );
229         buf.append( "\n" ); 
230         buf.append( "image = '" );
231         buf.append( getImage() );
232         buf.append( "'" );
233 
234         return buf.toString();
235     } //-- java.lang.String toString()
236 
237 }