@Test public void testCompare() { Assert.assertEquals(true, KylinVersion.isBefore200("1.9.9")); Assert.assertEquals(false, KylinVersion.isBefore200("2.0.0")); Assert.assertEquals(true, new KylinVersion("2.1.0").compareTo(new KylinVersion("2.1.0.123")) < 0); }
public static int compare(String v1, String v2) { return new KylinVersion(v1).compareTo(new KylinVersion(v2)); }
KylinVersion implements Comparable { public static int compare(String v1, String v2) { return new KylinVersion(v1).compareTo(new KylinVersion(v2)); } }
KylinVersion implements Comparable { public static int compare(String v1, String v2) { return new KylinVersion(v1).compareTo(new KylinVersion(v2)); } KylinVersion(String version); }
KylinVersion implements Comparable { public static int compare(String v1, String v2) { return new KylinVersion(v1).compareTo(new KylinVersion(v2)); } KylinVersion(String version); @Override String toString(); @Override int compareTo(Object o); static KylinVersion getCurrentVersion(); static boolean isBefore200(String ver); static int compare(String v1, String v2); static void main(String[] args); boolean isCompatibleWith(KylinVersion v); boolean isSignatureCompatibleWith(final KylinVersion v); static String getKylinClientInformation(); static String getGitCommitInfo(); }
KylinVersion implements Comparable { public static int compare(String v1, String v2) { return new KylinVersion(v1).compareTo(new KylinVersion(v2)); } KylinVersion(String version); @Override String toString(); @Override int compareTo(Object o); static KylinVersion getCurrentVersion(); static boolean isBefore200(String ver); static int compare(String v1, String v2); static void main(String[] args); boolean isCompatibleWith(KylinVersion v); boolean isSignatureCompatibleWith(final KylinVersion v); static String getKylinClientInformation(); static String getGitCommitInfo(); final int major; final int minor; final int revision; final int internal; final boolean isSnapshot; }