XfsVersion implements Comparable<XfsVersion> { public boolean isLT(final XfsVersion version) { return compareTo(version) < 0; } XfsVersion(final String version);  XfsVersion(final int version); int getMajorVersion(); int getMinorVersion(); int intValue(); boolean isGE(final XfsVersion version); boolean isGT(final XfsVersion version); boolean isLT(final XfsVersion version); boolean isLE(final XfsVersion version); @Override int compareTo(final XfsVersion version); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString(); final static XfsVersion V2_00; final static XfsVersion V3_00; final static XfsVersion V3_10; final static XfsVersion V3_20; final static XfsVersion V3_30; }
@Test public void compareLessThan() { final XfsVersion v3_00 = new XfsVersion("3.00"); final XfsVersion v2_00 = new XfsVersion("2.00"); assertEquals(true, v2_00.isLT(v3_00)); assertEquals(false, v3_00.isLT(v2_00)); assertEquals(false, v2_00.isLT(v2_00)); }