1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 package org.apache.maven.artifact.repository.metadata;
25
26
27
28
29
30
31
32 @SuppressWarnings( "all" )
33 public class SnapshotVersion
34 implements java.io.Serializable, java.lang.Cloneable
35 {
36
37
38
39
40
41
42
43
44
45 private String classifier = "";
46
47
48
49
50
51 private String extension;
52
53
54
55
56 private String version;
57
58
59
60
61
62
63 private String updated;
64
65
66
67
68
69
70
71
72
73
74
75 public SnapshotVersion clone()
76 {
77 try
78 {
79 SnapshotVersion copy = (SnapshotVersion) super.clone();
80
81 return copy;
82 }
83 catch ( java.lang.Exception ex )
84 {
85 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
86 + " does not support clone()" ).initCause( ex );
87 }
88 }
89
90
91
92
93
94
95
96 public boolean equals( Object other )
97 {
98 if ( this == other )
99 {
100 return true;
101 }
102
103 if ( !( other instanceof SnapshotVersion ) )
104 {
105 return false;
106 }
107
108 SnapshotVersion that = (SnapshotVersion) other;
109 boolean result = true;
110
111 result = result && ( getClassifier() == null ? that.getClassifier() == null : getClassifier().equals( that.getClassifier() ) );
112 result = result && ( getExtension() == null ? that.getExtension() == null : getExtension().equals( that.getExtension() ) );
113 result = result && ( getVersion() == null ? that.getVersion() == null : getVersion().equals( that.getVersion() ) );
114 result = result && ( getUpdated() == null ? that.getUpdated() == null : getUpdated().equals( that.getUpdated() ) );
115
116 return result;
117 }
118
119
120
121
122
123
124
125 public String getClassifier()
126 {
127 return this.classifier;
128 }
129
130
131
132
133
134
135
136 public String getExtension()
137 {
138 return this.extension;
139 }
140
141
142
143
144
145
146
147
148 public String getUpdated()
149 {
150 return this.updated;
151 }
152
153
154
155
156
157
158 public String getVersion()
159 {
160 return this.version;
161 }
162
163
164
165
166
167
168 public int hashCode()
169 {
170 int result = 17;
171
172 result = 37 * result + ( classifier != null ? classifier.hashCode() : 0 );
173 result = 37 * result + ( extension != null ? extension.hashCode() : 0 );
174 result = 37 * result + ( version != null ? version.hashCode() : 0 );
175 result = 37 * result + ( updated != null ? updated.hashCode() : 0 );
176
177 return result;
178 }
179
180
181
182
183
184
185
186 public void setClassifier( String classifier )
187 {
188 this.classifier = classifier;
189 }
190
191
192
193
194
195
196
197 public void setExtension( String extension )
198 {
199 this.extension = extension;
200 }
201
202
203
204
205
206
207
208
209 public void setUpdated( String updated )
210 {
211 this.updated = updated;
212 }
213
214
215
216
217
218
219 public void setVersion( String version )
220 {
221 this.version = version;
222 }
223
224
225
226
227
228
229 public java.lang.String toString()
230 {
231 StringBuilder buf = new StringBuilder( 128 );
232
233 buf.append( "classifier = '" );
234 buf.append( getClassifier() );
235 buf.append( "'" );
236 buf.append( "\n" );
237 buf.append( "extension = '" );
238 buf.append( getExtension() );
239 buf.append( "'" );
240 buf.append( "\n" );
241 buf.append( "version = '" );
242 buf.append( getVersion() );
243 buf.append( "'" );
244 buf.append( "\n" );
245 buf.append( "updated = '" );
246 buf.append( getUpdated() );
247 buf.append( "'" );
248
249 return buf.toString();
250 }
251
252 }