public class ComparableVersion extends java.lang.Object implements java.lang.Comparable<ComparableVersion>
Features:
-
' (dash) and '.
' (dot) separators,1.0alpha1 => [1, 0, alpha, 1]
snapshot
alpha
or a
beta
or b
milestone
or m
rc
or cr
(the empty string)
or ga
or final
sp
Modifier and Type | Class and Description |
---|---|
private static class |
ComparableVersion.IntegerItem
Represents a numeric item in the version item list.
|
private static interface |
ComparableVersion.Item |
private static class |
ComparableVersion.ListItem
Represents a version list item.
|
private static class |
ComparableVersion.StringItem
Represents a string in the version item list, usually a qualifier.
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
canonical |
private ComparableVersion.ListItem |
items |
private java.lang.String |
value |
Constructor and Description |
---|
ComparableVersion(java.lang.String version) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ComparableVersion o) |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
private static ComparableVersion.Item |
parseItem(boolean isDigit,
java.lang.String buf) |
void |
parseVersion(java.lang.String version) |
java.lang.String |
toString() |
private java.lang.String value
private java.lang.String canonical
private ComparableVersion.ListItem items
public final void parseVersion(java.lang.String version)
private static ComparableVersion.Item parseItem(boolean isDigit, java.lang.String buf)
public int compareTo(ComparableVersion o)
compareTo
in interface java.lang.Comparable<ComparableVersion>
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object