|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object biz.chitec.quarterback.util.VersionUtilities
Tools for comparing version strings. Version strings are assumed to contain up to three numeric values: main version, subversion and patchlevel. The comparation methods feature a lexicographical comparation of these number in natural manner.
Constructor Summary | |
private |
VersionUtilities()
Static class |
Method Summary | |
static int |
compareVersions(int[] v1,
int[] v2)
Compare two version numbers and return value for result. |
static int |
compareVersions(int v1,
int s1,
int p1,
int v2,
int s2,
int p2)
Compare two version numbers and return value for result. |
static int |
compareVersions(java.lang.String v1,
java.lang.String v2)
Compare two version numbers and return value for result. |
private static int[] |
evalVersion(java.lang.String v)
Internal helper method for splitting a version number given as String. |
static boolean |
firstLessThanOrEqualsSecond(int[] v1,
int[] v2)
Check difference between first and second version number. |
static boolean |
firstLessThanOrEqualsSecond(int v1,
int s1,
int p1,
int v2,
int s2,
int p2)
Check difference between first and second version number. |
static boolean |
firstLessThanOrEqualsSecond(java.lang.String v1,
java.lang.String v2)
Check difference between first and second version number. |
static boolean |
firstLessThanSecond(int[] v1,
int[] v2)
Check difference between first and second version number. |
static boolean |
firstLessThanSecond(int v1,
int s1,
int p1,
int v2,
int s2,
int p2)
Check difference between first and second version number. |
static boolean |
firstLessThanSecond(java.lang.String v1,
java.lang.String v2)
Check difference between first and second version number. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
private VersionUtilities()
Method Detail |
public static final int compareVersions(int v1, int s1, int p1, int v2, int s2, int p2)
v1
- Main version of first version numbers1
- Subversion of first version numberp1
- Patch level of first version numberv2
- Main version of second version numbers2
- Subversion of second version numberp2
- Patch level of second version number
public static final boolean firstLessThanSecond(int v1, int s1, int p1, int v2, int s2, int p2)
v1
- Main version of first version numbers1
- Subversion of first version numberp1
- Patch level of first version numberv2
- Main version of second version numbers2
- Subversion of second version numberp2
- Patch level of second version number
public static final boolean firstLessThanOrEqualsSecond(int v1, int s1, int p1, int v2, int s2, int p2)
v1
- Main version of first version numbers1
- Subversion of first version numberp1
- Patch level of first version numberv2
- Main version of second version numbers2
- Subversion of second version numberp2
- Patch level of second version number
private static final int[] evalVersion(java.lang.String v)
public static final int compareVersions(java.lang.String v1, java.lang.String v2)
v1
- First version as Stringv2
- Second version as String
public static final int compareVersions(int[] v1, int[] v2)
v1
- First version as array of ints.v2
- Second version as array of ints.
public static final boolean firstLessThanSecond(java.lang.String v1, java.lang.String v2)
v1
- First version as Stringv2
- Second version as String
public static final boolean firstLessThanSecond(int[] v1, int[] v2)
v1
- First version as array of ints.v2
- Second version as array of ints.
public static final boolean firstLessThanOrEqualsSecond(java.lang.String v1, java.lang.String v2)
v1
- First version as Stringv2
- Second version as String
public static final boolean firstLessThanOrEqualsSecond(int[] v1, int[] v2)
v1
- First version as array of ints.v2
- Second version as array of ints.
|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |