Class VersionInfo
java.lang.Object
com.ibm.icu.util.VersionInfo
- All Implemented Interfaces:
Comparable<VersionInfo>
Class to store version numbers of the form major.minor.milli.micro.
- Author:
- synwee
- Status:
- Stable ICU 2.6.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final VersionInfoDeprecated.This API is ICU internal only.static final StringDeprecated.This API is ICU internal only.static final VersionInfoICU4J current release versionstatic final VersionInfoCollation builder code version.static final VersionInfoCollation runtime version (sort key generator, string comparisons).static final VersionInfoDeprecated.ICU 54static final VersionInfoUnicode 1.0 versionstatic final VersionInfoUnicode 1.0.1 versionstatic final VersionInfoUnicode 1.1.0 versionstatic final VersionInfoUnicode 1.1.5 versionstatic final VersionInfoUnicode 10.0 versionstatic final VersionInfoUnicode 11.0 versionstatic final VersionInfoUnicode 12.0 versionstatic final VersionInfoUnicode 12.1 versionstatic final VersionInfoUnicode 13.0 versionstatic final VersionInfoUnicode 14.0 versionstatic final VersionInfoUnicode 15.0 versionstatic final VersionInfoUnicode 15.1 versionstatic final VersionInfoUnicode 16.0 versionstatic final VersionInfoUnicode 17.0 versionstatic final VersionInfoUnicode 18.0 versionstatic final VersionInfoUnicode 2.0 versionstatic final VersionInfoUnicode 2.1.2 versionstatic final VersionInfoUnicode 2.1.5 versionstatic final VersionInfoUnicode 2.1.8 versionstatic final VersionInfoUnicode 2.1.9 versionstatic final VersionInfoUnicode 3.0 versionstatic final VersionInfoUnicode 3.0.1 versionstatic final VersionInfoUnicode 3.1.0 versionstatic final VersionInfoUnicode 3.1.1 versionstatic final VersionInfoUnicode 3.2 versionstatic final VersionInfoUnicode 4.0 versionstatic final VersionInfoUnicode 4.0.1 versionstatic final VersionInfoUnicode 4.1 versionstatic final VersionInfoUnicode 5.0 versionstatic final VersionInfoUnicode 5.1 versionstatic final VersionInfoUnicode 5.2 versionstatic final VersionInfoUnicode 6.0 versionstatic final VersionInfoUnicode 6.1 versionstatic final VersionInfoUnicode 6.2 versionstatic final VersionInfoUnicode 6.3 versionstatic final VersionInfoUnicode 7.0 versionstatic final VersionInfoUnicode 8.0 versionstatic final VersionInfoUnicode 9.0 version -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(VersionInfo other) Compares other with this VersionInfo.booleanChecks if this version information is equals to the argument versionstatic VersionInfogetInstance(int major) Returns an instance of VersionInfo with the argument version.static VersionInfogetInstance(int major, int minor) Returns an instance of VersionInfo with the argument version.static VersionInfogetInstance(int major, int minor, int milli) Returns an instance of VersionInfo with the argument version.static VersionInfogetInstance(int major, int minor, int milli, int micro) Returns an instance of VersionInfo with the argument version.static VersionInfogetInstance(String version) Returns an instance of VersionInfo with the argument version.intgetMajor()Returns the major version numberintgetMicro()Returns the micro version numberintgetMilli()Returns the milli version numberintgetMinor()Returns the minor version numbergetVersionString(int minDigits, int maxDigits) Deprecated.This API is ICU internal only.inthashCode()Returns the hash code value for this set.static voidMain method prints out ICU version informationtoString()Returns the String representative of VersionInfo in the format of "major.minor.milli.micro"
-
Field Details
-
UNICODE_1_0
-
UNICODE_1_0_1
-
UNICODE_1_1_0
-
UNICODE_1_1_5
-
UNICODE_2_0
-
UNICODE_2_1_2
-
UNICODE_2_1_5
-
UNICODE_2_1_8
-
UNICODE_2_1_9
-
UNICODE_3_0
-
UNICODE_3_0_1
-
UNICODE_3_1_0
-
UNICODE_3_1_1
-
UNICODE_3_2
-
UNICODE_4_0
-
UNICODE_4_0_1
-
UNICODE_4_1
-
UNICODE_5_0
-
UNICODE_5_1
-
UNICODE_5_2
-
UNICODE_6_0
-
UNICODE_6_1
-
UNICODE_6_2
-
UNICODE_6_3
-
UNICODE_7_0
-
UNICODE_8_0
-
UNICODE_9_0
-
UNICODE_10_0
-
UNICODE_11_0
-
UNICODE_12_0
-
UNICODE_12_1
-
UNICODE_13_0
-
UNICODE_14_0
-
UNICODE_15_0
-
UNICODE_15_1
-
UNICODE_16_0
-
UNICODE_17_0
-
UNICODE_18_0
-
ICU_VERSION
-
ICU_DATA_VERSION_PATH
Deprecated.This API is ICU internal only.Data version string for ICU's data file. Not used when loading from resources packaged in the .jar. Used for appending to data path (e.g. icudt43b)- See Also:
- Status:
- Internal. This API is ICU internal only.
-
ICU_DATA_VERSION
Deprecated.This API is ICU internal only.Data version in ICU4J.- Status:
- Internal. This API is ICU internal only.
-
UCOL_RUNTIME_VERSION
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.- Status:
- Stable ICU 2.8.
-
UCOL_BUILDER_VERSION
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.- Status:
- Stable ICU 2.8.
-
UCOL_TAILORINGS_VERSION
Deprecated.ICU 54Constant version 1. This was intended to be the version of collation tailorings, but instead the tailoring data carries a version number.
-
-
Method Details
-
getInstance
Returns an instance of VersionInfo with the argument version.- Parameters:
version- 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".- Returns:
- an instance of VersionInfo with the argument version.
- Throws:
IllegalArgumentException- when the argument version is not in the right format- Status:
- Stable ICU 2.6.
-
getInstance
Returns an instance of VersionInfo with the argument version.- Parameters:
major- major version, non-negative number <= 255.minor- minor version, non-negative number <= 255.milli- milli version, non-negative number <= 255.micro- micro version, non-negative number <= 255.- Throws:
IllegalArgumentException- when either arguments are negative or > 255- Status:
- Stable ICU 2.6.
-
getInstance
Returns an instance of VersionInfo with the argument version. Equivalent to getInstance(major, minor, milli, 0).- Parameters:
major- major version, non-negative number <= 255.minor- minor version, non-negative number <= 255.milli- milli version, non-negative number <= 255.- Throws:
IllegalArgumentException- when either arguments are negative or > 255- Status:
- Stable ICU 2.6.
-
getInstance
Returns an instance of VersionInfo with the argument version. Equivalent to getInstance(major, minor, 0, 0).- Parameters:
major- major version, non-negative number <= 255.minor- minor version, non-negative number <= 255.- Throws:
IllegalArgumentException- when either arguments are negative or > 255- Status:
- Stable ICU 2.6.
-
getInstance
Returns an instance of VersionInfo with the argument version. Equivalent to getInstance(major, 0, 0, 0).- Parameters:
major- major version, non-negative number <= 255.- Throws:
IllegalArgumentException- when either arguments are negative or > 255- Status:
- Stable ICU 2.6.
-
toString
-
getMajor
public int getMajor()Returns the major version number- Returns:
- the major version number
- Status:
- Stable ICU 2.6.
-
getMinor
public int getMinor()Returns the minor version number- Returns:
- the minor version number
- Status:
- Stable ICU 2.6.
-
getMilli
public int getMilli()Returns the milli version number- Returns:
- the milli version number
- Status:
- Stable ICU 2.6.
-
getMicro
public int getMicro()Returns the micro version number- Returns:
- the micro version number
- Status:
- Stable ICU 2.6.
-
equals
-
hashCode
-
compareTo
Compares other with this VersionInfo.- Specified by:
compareToin interfaceComparable<VersionInfo>- Parameters:
other- VersionInfo to be compared- Returns:
- 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.
- Status:
- Stable ICU 2.6.
-
main
Main method prints out ICU version information- Parameters:
args- arguments (currently not used)- Status:
- Stable ICU 4.6.
-
getVersionString
Deprecated.This API is ICU internal only. (For use in CLDR, etc.)Generate version string separated by dots with the specified digit width. Version digit 0 afterminDigitswill be trimmed off.- Parameters:
minDigits- Minimum number of version digitsmaxDigits- Maximum number of version digits- Returns:
- A tailored version string
- Status:
- Internal. This API is ICU internal only.
-