View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.11,
3   // any modifications will be overwritten.
4   // ==============================================================
5   
6   package org.apache.maven.artifact.repository.metadata;
7   
8   /**
9    * Versioning information for a sub-artifact of the current
10   * snapshot artifact.
11   * 
12   * @version $Revision$ $Date$
13   */
14  @SuppressWarnings( "all" )
15  public class SnapshotVersion
16      implements java.io.Serializable, java.lang.Cloneable
17  {
18  
19        //--------------------------/
20       //- Class/Member Variables -/
21      //--------------------------/
22  
23      /**
24       * The classifier of the sub-artifact. Each classifier and
25       * extension pair may only appear once.
26       */
27      private String classifier = "";
28  
29      /**
30       * The file extension of the sub-artifact. Each classifier and
31       * extension pair may only appear once.
32       */
33      private String extension;
34  
35      /**
36       * The resolved snapshot version of the sub-artifact.
37       */
38      private String version;
39  
40      /**
41       * The timestamp when this version information was last
42       * updated. The timestamp is expressed using UTC in the format
43       * yyyyMMddHHmmss.
44       */
45      private String updated;
46  
47  
48        //-----------/
49       //- Methods -/
50      //-----------/
51  
52      /**
53       * Method clone.
54       * 
55       * @return SnapshotVersion
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      } //-- SnapshotVersion clone()
71  
72      /**
73       * Method equals.
74       * 
75       * @param other
76       * @return boolean
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      } //-- boolean equals( Object )
100 
101     /**
102      * Get the classifier of the sub-artifact. Each classifier and
103      * extension pair may only appear once.
104      * 
105      * @return String
106      */
107     public String getClassifier()
108     {
109         return this.classifier;
110     } //-- String getClassifier()
111 
112     /**
113      * Get the file extension of the sub-artifact. Each classifier
114      * and extension pair may only appear once.
115      * 
116      * @return String
117      */
118     public String getExtension()
119     {
120         return this.extension;
121     } //-- String getExtension()
122 
123     /**
124      * Get the timestamp when this version information was last
125      * updated. The timestamp is expressed using UTC in the format
126      * yyyyMMddHHmmss.
127      * 
128      * @return String
129      */
130     public String getUpdated()
131     {
132         return this.updated;
133     } //-- String getUpdated()
134 
135     /**
136      * Get the resolved snapshot version of the sub-artifact.
137      * 
138      * @return String
139      */
140     public String getVersion()
141     {
142         return this.version;
143     } //-- String getVersion()
144 
145     /**
146      * Method hashCode.
147      * 
148      * @return int
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     } //-- int hashCode()
161 
162     /**
163      * Set the classifier of the sub-artifact. Each classifier and
164      * extension pair may only appear once.
165      * 
166      * @param classifier
167      */
168     public void setClassifier( String classifier )
169     {
170         this.classifier = classifier;
171     } //-- void setClassifier( String )
172 
173     /**
174      * Set the file extension of the sub-artifact. Each classifier
175      * and extension pair may only appear once.
176      * 
177      * @param extension
178      */
179     public void setExtension( String extension )
180     {
181         this.extension = extension;
182     } //-- void setExtension( String )
183 
184     /**
185      * Set the timestamp when this version information was last
186      * updated. The timestamp is expressed using UTC in the format
187      * yyyyMMddHHmmss.
188      * 
189      * @param updated
190      */
191     public void setUpdated( String updated )
192     {
193         this.updated = updated;
194     } //-- void setUpdated( String )
195 
196     /**
197      * Set the resolved snapshot version of the sub-artifact.
198      * 
199      * @param version
200      */
201     public void setVersion( String version )
202     {
203         this.version = version;
204     } //-- void setVersion( String )
205 
206     /**
207      * Method toString.
208      * 
209      * @return String
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     } //-- java.lang.String toString()
233 
234 }