Modifier and Type | Method and Description |
---|---|
int |
compareTo(Version o)
Compares this version to the given one, segment by segment with a special
"SNAPSHOT" handling.
|
static Version |
create(java.lang.String str)
Creates a new version from the given string.
|
static Version |
create(java.lang.String[] segments)
Creates a new version from version segments
|
boolean |
equals(java.lang.Object o) |
java.lang.String[] |
getNormalizedSegments()
Returns all segments.
|
int |
hashCode() |
java.lang.String |
toString() |
public static final Version EMPTY
public static Version create(java.lang.String str)
str
- the version string.EMPTY
if str
is an empty string.public static Version create(java.lang.String[] segments)
segments
- version segmentsEMPTY
if segments
is empty.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String[] getNormalizedSegments()
public int compareTo(Version o)
compareTo
in interface java.lang.Comparable<Version>
o
- the other versionCopyright © 2010 - 2020 Adobe. All Rights Reserved