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