public class ComparableVersion extends Object implements Comparable<ComparableVersion>
Features:
-
' (dash) and '.
' (dot) separators,1.0alpha1 => [1, 0, alpha, 1]
alpha
or a
beta
or b
milestone
or m
rc
or cr
snapshot
(the empty string)
or ga
or final
sp
Constructor and Description |
---|
ComparableVersion(String version) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ComparableVersion o) |
boolean |
equals(Object o) |
String |
getCanonical() |
int |
hashCode() |
static void |
main(String... args)
Main to test version parsing and comparison.
|
void |
parseVersion(String version) |
String |
toString() |
public ComparableVersion(String version)
public final void parseVersion(String version)
public int compareTo(ComparableVersion o)
compareTo
in interface Comparable<ComparableVersion>
public String getCanonical()
Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.