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