package distMaker.node; import distMaker.LookUp; import glum.database.QueryItem; /** * Immutable object that defines attributes associated with a specific release. * * The following attributes are associated with the release: *
* Returns null if no infoMsg has been specified. */ public String getInfoMsg() { return infoMsg; } @Override public int compareTo(AppRelease o) { if (buildTime < o.buildTime) return -1; else if (buildTime > o.buildTime) return 1; return 0; } @Override public Object getValue(LookUp aEnum) { switch (aEnum) { case BuildTime: return buildTime; case Version: return version; default: return null; } } @Override public void setValue(LookUp aEnum, Object aObj) { throw new RuntimeException("Unsupported operation setValue(aEnum: " + aEnum + " aObj: " + aObj + ")"); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((appName == null) ? 0 : appName.hashCode()); result = prime * result + (int)(buildTime ^ (buildTime >>> 32)); result = prime * result + ((version == null) ? 0 : version.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; AppRelease other = (AppRelease)obj; if (appName == null) { if (other.appName != null) return false; } else if (!appName.equals(other.appName)) return false; if (buildTime != other.buildTime) return false; if (version == null) { if (other.version != null) return false; } else if (!version.equals(other.version)) return false; return true; } }