@Test public void testEqual() { assertFalse(middle.equals(high1)); assertFalse(middle.equals(high2)); assertFalse(middle.equals(high3)); assertFalse(middle.equals(low1)); assertFalse(middle.equals(low2)); assertFalse(middle.equals(low3)); assertFalse(middle.equals(null)); assertTrue(middle.equals(middle)); assertTrue(middle.equals(equal)); assertTrue(rc1.equals(equalrc1)); }
@Override public boolean equals(Object obj) { boolean result; if (!(obj instanceof GatewayVersion)) { result = false; } else if (obj == this) { result = true; } else { result = this.compareTo((GatewayVersion) obj) == 0; } return result; }
GatewayVersion implements Comparable<GatewayVersion> { @Override public boolean equals(Object obj) { boolean result; if (!(obj instanceof GatewayVersion)) { result = false; } else if (obj == this) { result = true; } else { result = this.compareTo((GatewayVersion) obj) == 0; } return result; } }
GatewayVersion implements Comparable<GatewayVersion> { @Override public boolean equals(Object obj) { boolean result; if (!(obj instanceof GatewayVersion)) { result = false; } else if (obj == this) { result = true; } else { result = this.compareTo((GatewayVersion) obj) == 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 boolean equals(Object obj) { boolean result; if (!(obj instanceof GatewayVersion)) { result = false; } else if (obj == this) { result = true; } else { result = this.compareTo((GatewayVersion) obj) == 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 boolean equals(Object obj) { boolean result; if (!(obj instanceof GatewayVersion)) { result = false; } else if (obj == this) { result = true; } else { result = this.compareTo((GatewayVersion) obj) == 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);  }