@Test public void testEquals() { assertTrue(version.equals(new Version(1, 2, 3))); assertNotEquals("", version.toString()); }
@Override public boolean equals(Object object) { if (object == this) { return true; } if (object instanceof Version) { return isEqualTo((Version) object); } return false; }
Version implements Serializable, Comparable<Version> { @Override public boolean equals(Object object) { if (object == this) { return true; } if (object instanceof Version) { return isEqualTo((Version) object); } return false; } }
Version implements Serializable, Comparable<Version> { @Override public boolean equals(Object object) { if (object == this) { return true; } if (object instanceof Version) { return isEqualTo((Version) object); } return false; } Version(int major, int minor, int update); }
Version implements Serializable, Comparable<Version> { @Override public boolean equals(Object object) { if (object == this) { return true; } if (object instanceof Version) { return isEqualTo((Version) object); } return false; } Version(int major, int minor, int update); static Version parseString(String version); boolean isGreaterThan(Version version); boolean isGreaterOrEqualThan(Version version); boolean isEqualTo(Version version); int getMinorVersion(); int getMajorVersion(); int getUpdateVersion(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object object); @Override int compareTo(Version v); }
Version implements Serializable, Comparable<Version> { @Override public boolean equals(Object object) { if (object == this) { return true; } if (object instanceof Version) { return isEqualTo((Version) object); } return false; } Version(int major, int minor, int update); static Version parseString(String version); boolean isGreaterThan(Version version); boolean isGreaterOrEqualThan(Version version); boolean isEqualTo(Version version); int getMinorVersion(); int getMajorVersion(); int getUpdateVersion(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object object); @Override int compareTo(Version v); static final Version ZERO; static final Version MIN; static final Version MAX; }