1
2
3
4
5
6
7
8
9
10
11 package org.apache.maven.doxia.site;
12
13
14
15
16
17
18 @SuppressWarnings( "all" )
19 public class LinkItem
20 implements java.io.Serializable, java.lang.Cloneable
21 {
22
23
24
25
26
27
28
29
30 private String name;
31
32
33
34
35 private String href;
36
37
38
39
40
41
42 private String target;
43
44
45
46
47 private Image image;
48
49
50
51
52
53
54
55
56
57
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 }
78
79
80
81
82
83
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 }
107
108
109
110
111
112
113 public String getHref()
114 {
115 return this.href;
116 }
117
118
119
120
121
122
123 public Image getImage()
124 {
125 return this.image;
126 }
127
128
129
130
131
132
133 public String getName()
134 {
135 return this.name;
136 }
137
138
139
140
141
142
143
144
145 public String getTarget()
146 {
147 return this.target;
148 }
149
150
151
152
153
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 }
166
167
168
169
170
171
172 public void setHref( String href )
173 {
174 this.href = href;
175 }
176
177
178
179
180
181
182 public void setImage( Image image )
183 {
184 this.image = image;
185 }
186
187
188
189
190
191
192 public void setName( String name )
193 {
194 this.name = name;
195 }
196
197
198
199
200
201
202
203
204 public void setTarget( String target )
205 {
206 this.target = target;
207 }
208
209
210
211
212
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 }
236
237 }