public final class VersionInfo extends java.lang.Object implements java.lang.Comparable<VersionInfo>
Modifier and Type | Field and Description |
---|---|
static VersionInfo |
ICU_DATA_VERSION
Deprecated.
This API is ICU internal only.
|
static java.lang.String |
ICU_DATA_VERSION_PATH
Deprecated.
This API is ICU internal only.
|
static VersionInfo |
ICU_VERSION
ICU4J current release version
|
static VersionInfo |
UCOL_BUILDER_VERSION
Collation builder code version.
|
static VersionInfo |
UCOL_RUNTIME_VERSION
Collation runtime version (sort key generator, string comparisons).
|
static VersionInfo |
UCOL_TAILORINGS_VERSION
Deprecated.
ICU 54
|
static VersionInfo |
UNICODE_1_0
Unicode 1.0 version
|
static VersionInfo |
UNICODE_1_0_1
Unicode 1.0.1 version
|
static VersionInfo |
UNICODE_1_1_0
Unicode 1.1.0 version
|
static VersionInfo |
UNICODE_1_1_5
Unicode 1.1.5 version
|
static VersionInfo |
UNICODE_10_0
Unicode 10.0 version
|
static VersionInfo |
UNICODE_11_0
Unicode 11.0 version
|
static VersionInfo |
UNICODE_12_0
Unicode 12.0 version
|
static VersionInfo |
UNICODE_12_1
Unicode 12.1 version
|
static VersionInfo |
UNICODE_13_0
Unicode 13.0 version
|
static VersionInfo |
UNICODE_14_0
Unicode 14.0 version
|
static VersionInfo |
UNICODE_15_0
Unicode 15.0 version
|
static VersionInfo |
UNICODE_2_0
Unicode 2.0 version
|
static VersionInfo |
UNICODE_2_1_2
Unicode 2.1.2 version
|
static VersionInfo |
UNICODE_2_1_5
Unicode 2.1.5 version
|
static VersionInfo |
UNICODE_2_1_8
Unicode 2.1.8 version
|
static VersionInfo |
UNICODE_2_1_9
Unicode 2.1.9 version
|
static VersionInfo |
UNICODE_3_0
Unicode 3.0 version
|
static VersionInfo |
UNICODE_3_0_1
Unicode 3.0.1 version
|
static VersionInfo |
UNICODE_3_1_0
Unicode 3.1.0 version
|
static VersionInfo |
UNICODE_3_1_1
Unicode 3.1.1 version
|
static VersionInfo |
UNICODE_3_2
Unicode 3.2 version
|
static VersionInfo |
UNICODE_4_0
Unicode 4.0 version
|
static VersionInfo |
UNICODE_4_0_1
Unicode 4.0.1 version
|
static VersionInfo |
UNICODE_4_1
Unicode 4.1 version
|
static VersionInfo |
UNICODE_5_0
Unicode 5.0 version
|
static VersionInfo |
UNICODE_5_1
Unicode 5.1 version
|
static VersionInfo |
UNICODE_5_2
Unicode 5.2 version
|
static VersionInfo |
UNICODE_6_0
Unicode 6.0 version
|
static VersionInfo |
UNICODE_6_1
Unicode 6.1 version
|
static VersionInfo |
UNICODE_6_2
Unicode 6.2 version
|
static VersionInfo |
UNICODE_6_3
Unicode 6.3 version
|
static VersionInfo |
UNICODE_7_0
Unicode 7.0 version
|
static VersionInfo |
UNICODE_8_0
Unicode 8.0 version
|
static VersionInfo |
UNICODE_9_0
Unicode 9.0 version
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(VersionInfo other)
Compares other with this VersionInfo.
|
boolean |
equals(java.lang.Object other)
Checks if this version information is equals to the argument version
|
static VersionInfo |
getInstance(int major)
Returns an instance of VersionInfo with the argument version.
|
static VersionInfo |
getInstance(int major,
int minor)
Returns an instance of VersionInfo with the argument version.
|
static VersionInfo |
getInstance(int major,
int minor,
int milli)
Returns an instance of VersionInfo with the argument version.
|
static VersionInfo |
getInstance(int major,
int minor,
int milli,
int micro)
Returns an instance of VersionInfo with the argument version.
|
static VersionInfo |
getInstance(java.lang.String version)
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
|
java.lang.String |
getVersionString(int minDigits,
int maxDigits)
Deprecated.
This API is ICU internal only. (For use in CLDR, etc.)
|
int |
hashCode()
Returns the hash code value for this set.
|
static void |
main(java.lang.String[] args)
Main method prints out ICU version information
|
java.lang.String |
toString()
Returns the String representative of VersionInfo in the format of
"major.minor.milli.micro"
|
public static final VersionInfo UNICODE_1_0
public static final VersionInfo UNICODE_1_0_1
public static final VersionInfo UNICODE_1_1_0
public static final VersionInfo UNICODE_1_1_5
public static final VersionInfo UNICODE_2_0
public static final VersionInfo UNICODE_2_1_2
public static final VersionInfo UNICODE_2_1_5
public static final VersionInfo UNICODE_2_1_8
public static final VersionInfo UNICODE_2_1_9
public static final VersionInfo UNICODE_3_0
public static final VersionInfo UNICODE_3_0_1
public static final VersionInfo UNICODE_3_1_0
public static final VersionInfo UNICODE_3_1_1
public static final VersionInfo UNICODE_3_2
public static final VersionInfo UNICODE_4_0
public static final VersionInfo UNICODE_4_0_1
public static final VersionInfo UNICODE_4_1
public static final VersionInfo UNICODE_5_0
public static final VersionInfo UNICODE_5_1
public static final VersionInfo UNICODE_5_2
public static final VersionInfo UNICODE_6_0
public static final VersionInfo UNICODE_6_1
public static final VersionInfo UNICODE_6_2
public static final VersionInfo UNICODE_6_3
public static final VersionInfo UNICODE_7_0
public static final VersionInfo UNICODE_8_0
public static final VersionInfo UNICODE_9_0
public static final VersionInfo UNICODE_10_0
public static final VersionInfo UNICODE_11_0
public static final VersionInfo UNICODE_12_0
public static final VersionInfo UNICODE_12_1
public static final VersionInfo UNICODE_13_0
public static final VersionInfo UNICODE_14_0
public static final VersionInfo UNICODE_15_0
public static final VersionInfo ICU_VERSION
@Deprecated public static final java.lang.String ICU_DATA_VERSION_PATH
@Deprecated public static final VersionInfo ICU_DATA_VERSION
public static final VersionInfo UCOL_RUNTIME_VERSION
public static final VersionInfo UCOL_BUILDER_VERSION
@Deprecated public static final VersionInfo UCOL_TAILORINGS_VERSION
public static VersionInfo getInstance(java.lang.String version)
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".java.lang.IllegalArgumentException
- when the argument version
is not in the right formatpublic static VersionInfo getInstance(int major, int minor, int milli, int micro)
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.java.lang.IllegalArgumentException
- when either arguments are negative or > 255public static VersionInfo getInstance(int major, int minor, int milli)
major
- major version, non-negative number <= 255.minor
- minor version, non-negative number <= 255.milli
- milli version, non-negative number <= 255.java.lang.IllegalArgumentException
- when either arguments are
negative or > 255public static VersionInfo getInstance(int major, int minor)
major
- major version, non-negative number <= 255.minor
- minor version, non-negative number <= 255.java.lang.IllegalArgumentException
- when either arguments are
negative or > 255public static VersionInfo getInstance(int major)
major
- major version, non-negative number <= 255.java.lang.IllegalArgumentException
- when either arguments are
negative or > 255public java.lang.String toString()
toString
in class java.lang.Object
public int getMajor()
public int getMinor()
public int getMilli()
public int getMicro()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- object to be comparedpublic int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public int compareTo(VersionInfo other)
compareTo
in interface java.lang.Comparable<VersionInfo>
other
- VersionInfo to be comparedpublic static void main(java.lang.String[] args)
args
- arguments (currently not used)@Deprecated public java.lang.String getVersionString(int minDigits, int maxDigits)
minDigits
will be trimmed off.minDigits
- Minimum number of version digitsmaxDigits
- Maximum number of version digitsCopyright ? 2016 Unicode, Inc. and others.