Package org.eclipse.jetty.start
Class Version
java.lang.Object
org.eclipse.jetty.start.Version
- All Implemented Interfaces:
Comparable<Version>
Utility class for parsing and comparing version strings.
http://www.oracle.com/technetwork/java/javase/namechange-140185.html
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Compares with other version.int
int
getMajor()
int
int
boolean
Check whether this version is in range of versions specifiedboolean
isNewerThan
(Version other) boolean
isNewerThanOrEqualTo
(Version other) boolean
isOlderThan
(Version other) boolean
isOlderThanOrEqualTo
(Version other) Return short string form (without suffix)toString()
-
Constructor Details
-
Version
-
-
Method Details
-
compareTo
Compares with other version. Does not take extension into account, as there is no reliable way to order them.- Specified by:
compareTo
in interfaceComparable<Version>
- Parameters:
other
- the other version to compare this to- Returns:
- -1 if this is older version that other, 0 if its same version, 1 if it's newer version than other
-
getLegacyMajor
public int getLegacyMajor() -
getMajor
public int getMajor() -
getRevision
public int getRevision() -
getUpdate
public int getUpdate() -
getSuffix
-
isNewerThan
-
isNewerThanOrEqualTo
-
isOlderThan
-
isOlderThanOrEqualTo
-
isInRange
Check whether this version is in range of versions specified- Parameters:
low
- the low part of the rangehigh
- the high part of the range- Returns:
- true if this version is within the provided range
-
toString
-
toShortString
Return short string form (without suffix)- Returns:
- string the short version string form
-