1 package net.sf.openrocket.communication;
5 import net.sf.openrocket.util.ArrayList;
6 import net.sf.openrocket.util.BuildProperties;
7 import net.sf.openrocket.util.ComparablePair;
9 public class UpdateInfo {
11 private final String latestVersion;
13 private final ArrayList<ComparablePair<Integer, String>> updates;
17 this.latestVersion = BuildProperties.getVersion();
18 this.updates = new ArrayList<ComparablePair<Integer, String>>();
21 public UpdateInfo(String version, List<ComparablePair<Integer, String>> updates) {
22 this.latestVersion = version;
23 this.updates = new ArrayList<ComparablePair<Integer, String>>(updates);
29 * Get the latest OpenRocket version. If it is the current version, then the value
30 * of {@link BuildProperties#getVersion()} is returned.
32 * @return the latest OpenRocket version.
34 public String getLatestVersion() {
40 * Return a list of the new features/updates that are available. The list has a
41 * priority for each update and a message text. The returned list may be modified.
43 * @return a modifiable list of the updates.
45 public List<ComparablePair<Integer, String>> getUpdates() {
46 return updates.clone();
50 public String toString() {
51 return "UpdateInfo[version=" + latestVersion + "; updates=" + updates.toString() + "]";