VersionInfo
class VersionInfo : Comparable<VersionInfo!>
kotlin.Any | |
↳ | android.icu.util.VersionInfo |
Class to store version numbers of the form major.minor.milli.micro.
Summary
Public methods | |
---|---|
Int |
compareTo(other: VersionInfo!) Compares other with this VersionInfo. |
Boolean |
Checks if this version information is equals to the argument version |
static VersionInfo! |
getInstance(major: Int) Returns an instance of VersionInfo with the argument version. |
static VersionInfo! |
getInstance(major: Int, minor: Int) Returns an instance of VersionInfo with the argument version. |
static VersionInfo! |
getInstance(major: Int, minor: Int, milli: Int) Returns an instance of VersionInfo with the argument version. |
static VersionInfo! |
getInstance(major: Int, minor: Int, milli: Int, micro: Int) Returns an instance of VersionInfo with the argument version. |
static VersionInfo! |
getInstance(version: String!) Returns an instance of VersionInfo with the argument version. |
Int |
getMajor() Returns the major version number |
Int |
getMicro() Returns the micro version number |
Int |
getMilli() Returns the milli version number |
Int |
getMinor() Returns the minor version number |
Int |
hashCode() Returns the hash code value for this set. |
String |
toString() Returns the String representative of VersionInfo in the format of "major. |
Properties | |
---|---|
static VersionInfo! |
ICU4J current release version |
static VersionInfo! |
Collation builder code version. |
static VersionInfo! |
Collation runtime version (sort key generator, string comparisons). |
static VersionInfo! |
Unicode 10. |
static VersionInfo! |
Unicode 11. |
static VersionInfo! |
Unicode 12. |
static VersionInfo! |
Unicode 12. |
static VersionInfo! |
Unicode 13. |
static VersionInfo! |
Unicode 14. |
static VersionInfo! |
Unicode 15. |
static VersionInfo! |
Unicode 15. |
static VersionInfo! |
Unicode 16. |
static VersionInfo! |
Unicode 1. |
static VersionInfo! |
Unicode 1. |
static VersionInfo! |
Unicode 1. |
static VersionInfo! |
Unicode 1. |
static VersionInfo! |
Unicode 2. |
static VersionInfo! |
Unicode 2. |
static VersionInfo! |
Unicode 2. |
static VersionInfo! |
Unicode 2. |
static VersionInfo! |
Unicode 2. |
static VersionInfo! |
Unicode 3. |
static VersionInfo! |
Unicode 3. |
static VersionInfo! |
Unicode 3. |
static VersionInfo! |
Unicode 3. |
static VersionInfo! |
Unicode 3. |
static VersionInfo! |
Unicode 4. |
static VersionInfo! |
Unicode 4. |
static VersionInfo! |
Unicode 4. |
static VersionInfo! |
Unicode 5. |
static VersionInfo! |
Unicode 5. |
static VersionInfo! |
Unicode 5. |
static VersionInfo! |
Unicode 6. |
static VersionInfo! |
Unicode 6. |
static VersionInfo! |
Unicode 6. |
static VersionInfo! |
Unicode 6. |
static VersionInfo! |
Unicode 7. |
static VersionInfo! |
Unicode 8. |
static VersionInfo! |
Unicode 9. |
Public methods
compareTo
fun compareTo(other: VersionInfo!): Int
Compares other with this VersionInfo.
Parameters | |
---|---|
o |
the object to be compared. |
other |
VersionInfo!: VersionInfo to be compared |
Return | |
---|---|
Int |
0 if the argument is a VersionInfo object that has version information equals to this object. Less than 0 if the argument is a VersionInfo object that has version information greater than this object. Greater than 0 if the argument is a VersionInfo object that has version information less than this object. |
Exceptions | |
---|---|
java.lang.NullPointerException |
if the specified object is null |
java.lang.ClassCastException |
if the specified object's type prevents it from being compared to this object. |
equals
fun equals(other: Any?): Boolean
Checks if this version information is equals to the argument version
Parameters | |
---|---|
obj |
the reference object with which to compare. |
other |
Any?: object to be compared |
Return | |
---|---|
Boolean |
true if other is equals to this object's version information, false otherwise |
getInstance
static fun getInstance(major: Int): VersionInfo!
Returns an instance of VersionInfo with the argument version. Equivalent to getInstance(major, 0, 0, 0).
Parameters | |
---|---|
major |
Int: major version, non-negative number <= 255. |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
when either arguments are negative or > 255 |
getInstance
static fun getInstance(
major: Int,
minor: Int
): VersionInfo!
Returns an instance of VersionInfo with the argument version. Equivalent to getInstance(major, minor, 0, 0).
Parameters | |
---|---|
major |
Int: major version, non-negative number <= 255. |
minor |
Int: minor version, non-negative number <= 255. |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
when either arguments are negative or > 255 |
getInstance
static fun getInstance(
major: Int,
minor: Int,
milli: Int
): VersionInfo!
Returns an instance of VersionInfo with the argument version. Equivalent to getInstance(major, minor, milli, 0).
Parameters | |
---|---|
major |
Int: major version, non-negative number <= 255. |
minor |
Int: minor version, non-negative number <= 255. |
milli |
Int: milli version, non-negative number <= 255. |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
when either arguments are negative or > 255 |
getInstance
static fun getInstance(
major: Int,
minor: Int,
milli: Int,
micro: Int
): VersionInfo!
Returns an instance of VersionInfo with the argument version.
Parameters | |
---|---|
major |
Int: major version, non-negative number <= 255. |
minor |
Int: minor version, non-negative number <= 255. |
milli |
Int: milli version, non-negative number <= 255. |
micro |
Int: micro version, non-negative number <= 255. |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
when either arguments are negative or > 255 |
getInstance
static fun getInstance(version: String!): VersionInfo!
Returns an instance of VersionInfo with the argument version.
Parameters | |
---|---|
version |
String!: version String in the format of "major.minor.milli.micro" or "major.minor.milli" or "major.minor" or "major", where major, minor, milli, micro are non-negative numbers <= 255. If the trailing version numbers are not specified they are taken as 0s. E.g. Version "3.1" is equivalent to "3.1.0.0". |
Return | |
---|---|
VersionInfo! |
an instance of VersionInfo with the argument version. |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
when the argument version is not in the right format |
getMajor
fun getMajor(): Int
Returns the major version number
Return | |
---|---|
Int |
the major version number |
getMicro
fun getMicro(): Int
Returns the micro version number
Return | |
---|---|
Int |
the micro version number |
getMilli
fun getMilli(): Int
Returns the milli version number
Return | |
---|---|
Int |
the milli version number |
getMinor
fun getMinor(): Int
Returns the minor version number
Return | |
---|---|
Int |
the minor version number |
hashCode
fun hashCode(): Int
Returns the hash code value for this set.
Return | |
---|---|
Int |
the hash code value for this set. |
See Also
toString
fun toString(): String
Returns the String representative of VersionInfo in the format of "major.minor.milli.micro"
Return | |
---|---|
String |
String representative of VersionInfo |
Properties
ICU_VERSION
static val ICU_VERSION: VersionInfo!
ICU4J current release version
UCOL_BUILDER_VERSION
static val UCOL_BUILDER_VERSION: VersionInfo!
Collation builder code version. When this is different, the same tailoring might result in assigning different collation elements to code points. This value may change in subsequent releases of ICU.
UCOL_RUNTIME_VERSION
static val UCOL_RUNTIME_VERSION: VersionInfo!
Collation runtime version (sort key generator, string comparisons). If the version is different, sort keys for the same string could be different. This value may change in subsequent releases of ICU.