public final class Version extends Object implements Comparable<Version>
Version("5", "*").compareTo(Version("5.0", "*") == 0
Version("5", "*").equals(Version("5.0", "*") == false;| Constructor and Description |
|---|
Version(String version)
Creates a Version instance from the dot-separated Version String using null as the padding
|
Version(String version,
String versionPadding)
Creates a Version instance from the dot-separated Version String and the
versionPadding.
|
public Version(String version)
version - The dot-separated version to representNullPointerException - if the version is nullIllegalArgumentException - if the version is an empty StringVersion(String, String)public Version(String version, String versionPadding)
version - The dot-separated version to representversionPadding - The value to return for sub-version sections
requested beyond the sub-version sections present in the version StringNullPointerException - if version or versionPadding are nullIllegalArgumentException - if version or versionPadding are the
empty Stringpublic int compareTo(Version otherVersion)
compareTo in interface Comparable<Version>otherVersion - The Version object to compare this Version Object withCopyright © 2001-2016 The Apache Software Foundation. All Rights Reserved.