@Test public void testVersioncompareTo() { assertTrue(middle.compareTo(high1) < 0); assertTrue(middle.compareTo(high2) < 0); assertTrue(middle.compareTo(high3) < 0); assertTrue(middle.compareTo(low1) > 0); assertTrue(middle.compareTo(low2) > 0); assertTrue(middle.compareTo(low3) > 0); assertTrue(middle.compareTo(equal) == 0); assertTrue(middle.compareTo(middle) == 0); assertTrue(rc1.compareTo(middle) < 0); assertTrue(rc2.compareTo(middle) < 0); assertTrue(rc2.compareTo(rc1) > 0); assertTrue(rc2.compareTo(low3) > 0); }
@Override public int compareTo(GatewayVersion o) { int result; if (this.major != o.major) { result = this.major > o.major ? 1 : -1; } else if (this.minor != o.minor) { result = this.minor > o.minor ? 1 : -1; } else if (this.patch != o.patch) { result = this.patch > o.patch ? 1 : -1; } else if (!this.rc.equals(o.rc)) { result = RELEASE_GA.equals(this.rc)?1:(RELEASE_GA.equals(o.rc)?-1:this.rc.compareTo(o.rc)); } else { result = 0; } return result; }
GatewayVersion implements Comparable<GatewayVersion> { @Override public int compareTo(GatewayVersion o) { int result; if (this.major != o.major) { result = this.major > o.major ? 1 : -1; } else if (this.minor != o.minor) { result = this.minor > o.minor ? 1 : -1; } else if (this.patch != o.patch) { result = this.patch > o.patch ? 1 : -1; } else if (!this.rc.equals(o.rc)) { result = RELEASE_GA.equals(this.rc)?1:(RELEASE_GA.equals(o.rc)?-1:this.rc.compareTo(o.rc)); } else { result = 0; } return result; } }
GatewayVersion implements Comparable<GatewayVersion> { @Override public int compareTo(GatewayVersion o) { int result; if (this.major != o.major) { result = this.major > o.major ? 1 : -1; } else if (this.minor != o.minor) { result = this.minor > o.minor ? 1 : -1; } else if (this.patch != o.patch) { result = this.patch > o.patch ? 1 : -1; } else if (!this.rc.equals(o.rc)) { result = RELEASE_GA.equals(this.rc)?1:(RELEASE_GA.equals(o.rc)?-1:this.rc.compareTo(o.rc)); } else { result = 0; } return result; } GatewayVersion(int major, int minor, int patch, String rc);  GatewayVersion(int major, int minor, int patch); }
GatewayVersion implements Comparable<GatewayVersion> { @Override public int compareTo(GatewayVersion o) { int result; if (this.major != o.major) { result = this.major > o.major ? 1 : -1; } else if (this.minor != o.minor) { result = this.minor > o.minor ? 1 : -1; } else if (this.patch != o.patch) { result = this.patch > o.patch ? 1 : -1; } else if (!this.rc.equals(o.rc)) { result = RELEASE_GA.equals(this.rc)?1:(RELEASE_GA.equals(o.rc)?-1:this.rc.compareTo(o.rc)); } else { result = 0; } return result; } GatewayVersion(int major, int minor, int patch, String rc);  GatewayVersion(int major, int minor, int patch); int getMajor(); int getMinor(); int getPatch(); String getRc(); @Override boolean equals(Object obj); @Override int hashCode(); static GatewayVersion parseGatewayVersion(String version); @Override String toString(); @Override int compareTo(GatewayVersion o); }
GatewayVersion implements Comparable<GatewayVersion> { @Override public int compareTo(GatewayVersion o) { int result; if (this.major != o.major) { result = this.major > o.major ? 1 : -1; } else if (this.minor != o.minor) { result = this.minor > o.minor ? 1 : -1; } else if (this.patch != o.patch) { result = this.patch > o.patch ? 1 : -1; } else if (!this.rc.equals(o.rc)) { result = RELEASE_GA.equals(this.rc)?1:(RELEASE_GA.equals(o.rc)?-1:this.rc.compareTo(o.rc)); } else { result = 0; } return result; } GatewayVersion(int major, int minor, int patch, String rc);  GatewayVersion(int major, int minor, int patch); int getMajor(); int getMinor(); int getPatch(); String getRc(); @Override boolean equals(Object obj); @Override int hashCode(); static GatewayVersion parseGatewayVersion(String version); @Override String toString(); @Override int compareTo(GatewayVersion o);  }