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