public class FrontendVersion extends Object implements Serializable, Comparable<FrontendVersion>
For internal use only. May be renamed or removed in a future release.
Constructor and Description |
---|
FrontendVersion(int major,
int minor)
Create a version of format "major.minor.0".
|
FrontendVersion(int major,
int minor,
int revision)
Create a version of format "major.minor.revision".
|
FrontendVersion(int major,
int minor,
int revision,
String build)
Create a version of format "major.minor.revision.build"
|
FrontendVersion(String version)
Parse version numbers from version string with the format
"major.minor.revision[.build]".
|
FrontendVersion(String name,
String version)
Parse version numbers from version string with the format
"major.minor.revision[.build]".
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(FrontendVersion other)
Compare version numbers and return order as -1, 0 and 1.
|
boolean |
equals(Object obj) |
String |
getBuildIdentifier()
Gets the version qualifier, qualifier in
x.y.z.qualifier.
|
String |
getFullVersion()
Gets the full version, in format x.y.z or
x.y.z.qualifier.
|
int |
getMajorVersion()
Gets the major version, x in x.y.z.qualifier.
|
int |
getMinorVersion()
Gets the minor version, y in x.y.z.qualifier.
|
int |
getRevision()
Gets the revision, z in x.y.z.qualifier.
|
int |
hashCode() |
boolean |
isEqualTo(FrontendVersion otherVersion)
Check if this and the given version are equal to each other.
|
boolean |
isNewerThan(FrontendVersion otherVersion)
Check if this version is newer than given version.
|
boolean |
isOlderThan(FrontendVersion otherVersion)
Check if this version is older than given version.
|
String |
toString() |
public FrontendVersion(int major, int minor)
major
- major versionminor
- minor versionpublic FrontendVersion(int major, int minor, int revision)
major
- major versionminor
- minor versionrevision
- revision numberpublic FrontendVersion(int major, int minor, int revision, String build)
major
- major versionminor
- minor versionrevision
- revision numberbuild
- build identifierpublic FrontendVersion(String version)
Versions are normalized and any caret or tildes will not be considered.
version
- version string as "major.minor.revision[.build]"public FrontendVersion(String name, String version)
Versions are normalized and any caret or tildes will not be considered.
name
- the name of the artifact which version is to be parsed, used
in error message to help discover the issueversion
- version string as "major.minor.revision[.build]"public String getFullVersion()
public int getMajorVersion()
public int getMinorVersion()
public int getRevision()
public String getBuildIdentifier()
public boolean isOlderThan(FrontendVersion otherVersion)
otherVersion
- version to check againstpublic boolean isNewerThan(FrontendVersion otherVersion)
otherVersion
- version to check againstpublic boolean isEqualTo(FrontendVersion otherVersion)
otherVersion
- version to test equals withpublic int compareTo(FrontendVersion other)
compareTo
in interface Comparable<FrontendVersion>
other
- version to compare against this versionCopyright © 2025. All rights reserved.