View Javadoc

1   /*
2    * BUD, installer for development platform.
3    *
4    * Copyright(c) 2006 bud-project - http://opensource.org/licenses/apachepl.php
5    */
6   package org.bud.kernel.model;
7   import java.util.ArrayList;
8   import java.util.List;
9   /***
10   *
11   */
12  public class Release implements Comparable {
13      private Version version = new Version(0, 0, 0);
14      private String description;
15      private List features = new ArrayList();
16  
17  
18      public Release() {
19      }
20  
21  
22      public Release(Version version) {
23          this.version = version;
24      }
25  
26  
27      public String getDescription() {
28          return description;
29      }
30  
31  
32      public void setDescription(String description) {
33          this.description = description;
34      }
35  
36  
37      public Version getVersion() {
38          return version;
39      }
40  
41  
42      public String getVersionString() {
43          return version.toString();
44      }
45  
46  
47      public void setVersionString(String versionString) {
48          version = Version.createVersion(versionString);
49      }
50  
51  
52      public void addFeature(Feature feature) {
53          features.add(feature);
54      }
55  
56  
57      public Feature getFeature(int index) {
58          return (Feature)features.get(index);
59      }
60  
61  
62      public int compareTo(Object right) {
63          return getVersion().compareTo(((Release)right).getVersion());
64      }
65  
66  
67      public Feature[] getFeatures() {
68          return (Feature[])features.toArray(new Feature[features.size()]);
69      }
70  }