com.ibm.icu.util

Class VersionInfo

public final class VersionInfo extends Object

Class to store version numbers of the form major.minor.milli.micro.

Author: synwee

UNKNOWN: ICU 2.6

Field Summary
static StringICU_DATA_VERSION
Data version string for ICU's internal data
static VersionInfoICU_VERSION
ICU4J current release version
static VersionInfoUCOL_BUILDER_VERSION
ICU4J collator builder version
static VersionInfoUCOL_RUNTIME_VERSION
ICU4J collator runtime version
static VersionInfoUCOL_TAILORINGS_VERSION
ICU4J collator tailorings version
static VersionInfoUNICODE_1_0
Unicode 1.0 version
static VersionInfoUNICODE_1_0_1
Unicode 1.0.1 version
static VersionInfoUNICODE_1_1_0
Unicode 1.1.0 version
static VersionInfoUNICODE_1_1_5
Unicode 1.1.5 version
static VersionInfoUNICODE_2_0
Unicode 2.0 version
static VersionInfoUNICODE_2_1_2
Unicode 2.1.2 version
static VersionInfoUNICODE_2_1_5
Unicode 2.1.5 version
static VersionInfoUNICODE_2_1_8
Unicode 2.1.8 version
static VersionInfoUNICODE_2_1_9
Unicode 2.1.9 version
static VersionInfoUNICODE_3_0
Unicode 3.0 version
static VersionInfoUNICODE_3_0_1
Unicode 3.0.1 version
static VersionInfoUNICODE_3_1_0
Unicode 3.1.0 version
static VersionInfoUNICODE_3_1_1
Unicode 3.1.1 version
static VersionInfoUNICODE_3_2
Unicode 3.2 version
static VersionInfoUNICODE_4_0
Unicode 4.0 version
static VersionInfoUNICODE_4_0_1
Unicode 4.0.1 version
static VersionInfoUNICODE_4_1
Unicode 4.1 version
static VersionInfoUNICODE_5_0
Unicode 5.0 version
Method Summary
intcompareTo(VersionInfo other)
Compares other with this VersionInfo.
booleanequals(Object other)
Checks if this version information is equals to the argument version
static VersionInfogetInstance(String version)
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(int major, int minor, int milli)
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)
Returns an instance of VersionInfo with the argument version.
intgetMajor()
Returns the major version number
intgetMicro()
Returns the micro version number
intgetMilli()
Returns the milli version number
intgetMinor()
Returns the minor version number
static VersionInfojavaVersion()
StringtoString()
Returns the String representative of VersionInfo in the format of "major.minor.milli.micro"

Field Detail

ICU_DATA_VERSION

public static final String ICU_DATA_VERSION

Deprecated: This API is ICU internal only.

Data version string for ICU's internal data

UNKNOWN:

ICU_VERSION

public static final VersionInfo ICU_VERSION
ICU4J current release version

UNKNOWN: ICU 2.8

UCOL_BUILDER_VERSION

public static final VersionInfo UCOL_BUILDER_VERSION
ICU4J collator builder version

UNKNOWN: ICU 2.8

UCOL_RUNTIME_VERSION

public static final VersionInfo UCOL_RUNTIME_VERSION
ICU4J collator runtime version

UNKNOWN: ICU 2.8

UCOL_TAILORINGS_VERSION

public static final VersionInfo UCOL_TAILORINGS_VERSION
ICU4J collator tailorings version

UNKNOWN: ICU 2.8

UNICODE_1_0

public static final VersionInfo UNICODE_1_0
Unicode 1.0 version

UNKNOWN: ICU 2.6

UNICODE_1_0_1

public static final VersionInfo UNICODE_1_0_1
Unicode 1.0.1 version

UNKNOWN: ICU 2.6

UNICODE_1_1_0

public static final VersionInfo UNICODE_1_1_0
Unicode 1.1.0 version

UNKNOWN: ICU 2.6

UNICODE_1_1_5

public static final VersionInfo UNICODE_1_1_5
Unicode 1.1.5 version

UNKNOWN: ICU 2.6

UNICODE_2_0

public static final VersionInfo UNICODE_2_0
Unicode 2.0 version

UNKNOWN: ICU 2.6

UNICODE_2_1_2

public static final VersionInfo UNICODE_2_1_2
Unicode 2.1.2 version

UNKNOWN: ICU 2.6

UNICODE_2_1_5

public static final VersionInfo UNICODE_2_1_5
Unicode 2.1.5 version

UNKNOWN: ICU 2.6

UNICODE_2_1_8

public static final VersionInfo UNICODE_2_1_8
Unicode 2.1.8 version

UNKNOWN: ICU 2.6

UNICODE_2_1_9

public static final VersionInfo UNICODE_2_1_9
Unicode 2.1.9 version

UNKNOWN: ICU 2.6

UNICODE_3_0

public static final VersionInfo UNICODE_3_0
Unicode 3.0 version

UNKNOWN: ICU 2.6

UNICODE_3_0_1

public static final VersionInfo UNICODE_3_0_1
Unicode 3.0.1 version

UNKNOWN: ICU 2.6

UNICODE_3_1_0

public static final VersionInfo UNICODE_3_1_0
Unicode 3.1.0 version

UNKNOWN: ICU 2.6

UNICODE_3_1_1

public static final VersionInfo UNICODE_3_1_1
Unicode 3.1.1 version

UNKNOWN: ICU 2.6

UNICODE_3_2

public static final VersionInfo UNICODE_3_2
Unicode 3.2 version

UNKNOWN: ICU 2.6

UNICODE_4_0

public static final VersionInfo UNICODE_4_0
Unicode 4.0 version

UNKNOWN: ICU 2.6

UNICODE_4_0_1

public static final VersionInfo UNICODE_4_0_1
Unicode 4.0.1 version

UNKNOWN: ICU 3.4 This API might change or be removed in a future release.

UNICODE_4_1

public static final VersionInfo UNICODE_4_1
Unicode 4.1 version

UNKNOWN: ICU 3.4 This API might change or be removed in a future release.

UNICODE_5_0

public static final VersionInfo UNICODE_5_0
Unicode 5.0 version

UNKNOWN: ICU 3.4 This API might change or be removed in a future release.

Method Detail

compareTo

public int compareTo(VersionInfo other)
Compares other with this 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.

UNKNOWN: ICU 2.6

equals

public boolean equals(Object other)
Checks if this version information is equals to the argument version

Parameters: other object to be compared

Returns: true if other is equals to this object's version information, false otherwise

UNKNOWN: ICU 2.6

getInstance

public static VersionInfo getInstance(String version)
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: throws an IllegalArgumentException when the argument version is not in the right format

UNKNOWN: ICU 2.6

getInstance

public static VersionInfo getInstance(int major, int minor, int milli, int micro)
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: throws an IllegalArgumentException when either arguments are negative or > 255

UNKNOWN: ICU 2.6

getInstance

public static VersionInfo getInstance(int major, int minor, int milli)
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: throws an IllegalArgumentException when either arguments are negative or > 255

UNKNOWN: ICU 2.6

getInstance

public static VersionInfo getInstance(int major, int minor)
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: throws an IllegalArgumentException when either arguments are negative or > 255

UNKNOWN: ICU 2.6

getInstance

public static VersionInfo getInstance(int major)
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: throws an IllegalArgumentException when either arguments are negative or > 255

UNKNOWN: ICU 2.6

getMajor

public int getMajor()
Returns the major version number

Returns: the major version number

UNKNOWN: ICU 2.6

getMicro

public int getMicro()
Returns the micro version number

Returns: the micro version number

UNKNOWN: ICU 2.6

getMilli

public int getMilli()
Returns the milli version number

Returns: the milli version number

UNKNOWN: ICU 2.6

getMinor

public int getMinor()
Returns the minor version number

Returns: the minor version number

UNKNOWN: ICU 2.6

javaVersion

public static VersionInfo javaVersion()

Deprecated: This API is ICU internal only.

UNKNOWN:

toString

public String toString()
Returns the String representative of VersionInfo in the format of "major.minor.milli.micro"

Returns: String representative of VersionInfo

UNKNOWN: ICU 2.6

Copyright (c) 2007 IBM Corporation and others.