agave-apps/apps-core/src/main/java/org/iplantc/service/apps/model/Software.java
/**
	 * Null and type safe comparison of this class to another.
	 * @param o the object to compare
	 * @return 1 if greater, 0 if same, -1 if less
	 */
Null and type safe comparison of this class to another.
@param o the object to compare
@return 1 if greater, 0 if same, -1 if less
Null and type safe comparison of this class to another . @param o the object to compare @return 1 if greater 0 if same - 1 if less
public int compareTo(Object o)
	{
		if (o instanceof Software) {
			int nameComp = this.name.compareTo( ( (Software) o ).name);
			if (nameComp == 0) {
				int versionComp = this.version.compareTo( ( (Software) o ).version);
				if (versionComp == 0) {
					int revisionComp = this.revisionCount.compareTo( ( (Software) o ).revisionCount);
					if (revisionComp == 0) {
						return this.id.compareTo( ( (Software) o ).id);
					} else {
						return revisionComp;
					}
				} else {
					return versionComp;
				}
			} else {
				return nameComp;
			}
		} else {
			return 0;
		}
	}
public int compareTo ( Object o ) { if ( o instanceof Software ) { int nameComp = this . name . compareTo ( ( ( Software ) o ) . name ) ; if ( nameComp == 0 ) { int versionComp = this . version . compareTo ( ( ( Software ) o ) . version ) ; if ( versionComp == 0 ) { int revisionComp = this . revisionCount . compareTo ( ( ( Software ) o ) . revisionCount ) ; if ( revisionComp == 0 ) { return this . id . compareTo ( ( ( Software ) o ) . id ) ; } else { return revisionComp ; } } else { return versionComp ; } } else { return nameComp ; } } else { return 0 ; } }
Null and type safe comparison of this class to another.
Null and type safe comparison of this class to another .