Most visited

Recently visited

Added in API level 24

VersionInfo

public final class VersionInfo
extends Object implements Comparable<VersionInfo>

java.lang.Object
   ↳ android.icu.util.VersionInfo


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

Summary

Fields

public static final VersionInfo ICU_VERSION

ICU4J current release version

public static final VersionInfo UCOL_BUILDER_VERSION

Collation builder code version.

public static final VersionInfo UCOL_RUNTIME_VERSION

Collation runtime version (sort key generator, string comparisons).

public static final VersionInfo UNICODE_1_0

Unicode 1.0 version

public static final VersionInfo UNICODE_1_0_1

Unicode 1.0.1 version

public static final VersionInfo UNICODE_1_1_0

Unicode 1.1.0 version

public static final VersionInfo UNICODE_1_1_5

Unicode 1.1.5 version

public static final VersionInfo UNICODE_2_0

Unicode 2.0 version

public static final VersionInfo UNICODE_2_1_2

Unicode 2.1.2 version

public static final VersionInfo UNICODE_2_1_5

Unicode 2.1.5 version

public static final VersionInfo UNICODE_2_1_8

Unicode 2.1.8 version

public static final VersionInfo UNICODE_2_1_9

Unicode 2.1.9 version

public static final VersionInfo UNICODE_3_0

Unicode 3.0 version

public static final VersionInfo UNICODE_3_0_1

Unicode 3.0.1 version

public static final VersionInfo UNICODE_3_1_0

Unicode 3.1.0 version

public static final VersionInfo UNICODE_3_1_1

Unicode 3.1.1 version

public static final VersionInfo UNICODE_3_2

Unicode 3.2 version

public static final VersionInfo UNICODE_4_0

Unicode 4.0 version

public static final VersionInfo UNICODE_4_0_1

Unicode 4.0.1 version

public static final VersionInfo UNICODE_4_1

Unicode 4.1 version

public static final VersionInfo UNICODE_5_0

Unicode 5.0 version

public static final VersionInfo UNICODE_5_1

Unicode 5.1 version

public static final VersionInfo UNICODE_5_2

Unicode 5.2 version

public static final VersionInfo UNICODE_6_0

Unicode 6.0 version

public static final VersionInfo UNICODE_6_1

Unicode 6.1 version

public static final VersionInfo UNICODE_6_2

Unicode 6.2 version

public static final VersionInfo UNICODE_6_3

Unicode 6.3 version

public static final VersionInfo UNICODE_7_0

Unicode 7.0 version

public static final VersionInfo UNICODE_8_0

Unicode 8.0 version

Public methods

int compareTo(VersionInfo other)

Compares other with this VersionInfo.

boolean equals(Object other)

Checks if this version information is equals to the argument version

static VersionInfo getInstance(String version)

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(int major, int minor, int milli)

Returns an instance of VersionInfo with 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.

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

String toString()

Returns the String representative of VersionInfo in the format of "major.minor.milli.micro"

Inherited methods

From class java.lang.Object
From interface java.lang.Comparable

Fields

ICU_VERSION

Added in API level 24
VersionInfo ICU_VERSION

ICU4J current release version

UCOL_BUILDER_VERSION

Added in API level 24
VersionInfo 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.

UCOL_RUNTIME_VERSION

Added in API level 24
VersionInfo 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.

UNICODE_1_0

Added in API level 24
VersionInfo UNICODE_1_0

Unicode 1.0 version

UNICODE_1_0_1

Added in API level 24
VersionInfo UNICODE_1_0_1

Unicode 1.0.1 version

UNICODE_1_1_0

Added in API level 24
VersionInfo UNICODE_1_1_0

Unicode 1.1.0 version

UNICODE_1_1_5

Added in API level 24
VersionInfo UNICODE_1_1_5

Unicode 1.1.5 version

UNICODE_2_0

Added in API level 24
VersionInfo UNICODE_2_0

Unicode 2.0 version

UNICODE_2_1_2

Added in API level 24
VersionInfo UNICODE_2_1_2

Unicode 2.1.2 version

UNICODE_2_1_5

Added in API level 24
VersionInfo UNICODE_2_1_5

Unicode 2.1.5 version

UNICODE_2_1_8

Added in API level 24
VersionInfo UNICODE_2_1_8

Unicode 2.1.8 version

UNICODE_2_1_9

Added in API level 24
VersionInfo UNICODE_2_1_9

Unicode 2.1.9 version

UNICODE_3_0

Added in API level 24
VersionInfo UNICODE_3_0

Unicode 3.0 version

UNICODE_3_0_1

Added in API level 24
VersionInfo UNICODE_3_0_1

Unicode 3.0.1 version

UNICODE_3_1_0

Added in API level 24
VersionInfo UNICODE_3_1_0

Unicode 3.1.0 version

UNICODE_3_1_1

Added in API level 24
VersionInfo UNICODE_3_1_1

Unicode 3.1.1 version

UNICODE_3_2

Added in API level 24
VersionInfo UNICODE_3_2

Unicode 3.2 version

UNICODE_4_0

Added in API level 24
VersionInfo UNICODE_4_0

Unicode 4.0 version

UNICODE_4_0_1

Added in API level 24
VersionInfo UNICODE_4_0_1

Unicode 4.0.1 version

UNICODE_4_1

Added in API level 24
VersionInfo UNICODE_4_1

Unicode 4.1 version

UNICODE_5_0

Added in API level 24
VersionInfo UNICODE_5_0

Unicode 5.0 version

UNICODE_5_1

Added in API level 24
VersionInfo UNICODE_5_1

Unicode 5.1 version

UNICODE_5_2

Added in API level 24
VersionInfo UNICODE_5_2

Unicode 5.2 version

UNICODE_6_0

Added in API level 24
VersionInfo UNICODE_6_0

Unicode 6.0 version

UNICODE_6_1

Added in API level 24
VersionInfo UNICODE_6_1

Unicode 6.1 version

UNICODE_6_2

Added in API level 24
VersionInfo UNICODE_6_2

Unicode 6.2 version

UNICODE_6_3

Added in API level 24
VersionInfo UNICODE_6_3

Unicode 6.3 version

UNICODE_7_0

Added in API level 24
VersionInfo UNICODE_7_0

Unicode 7.0 version

UNICODE_8_0

Added in API level 24
VersionInfo UNICODE_8_0

Unicode 8.0 version

Public methods

compareTo

Added in API level 24
int compareTo (VersionInfo other)

Compares other with this VersionInfo.

Parameters
other VersionInfo: VersionInfo to be compared
Returns
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.

equals

Added in API level 24
boolean equals (Object other)

Checks if this version information is equals to the argument version

Parameters
other Object: object to be compared
Returns
boolean true if other is equals to this object's version information, false otherwise

getInstance

Added in API level 24
VersionInfo getInstance (String version)

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".
Returns
VersionInfo an instance of VersionInfo with the argument version.
Throws
IllegalArgumentException when the argument version is not in the right format

getInstance

Added in API level 24
VersionInfo getInstance (int major, 
                int minor, 
                int milli, 
                int micro)

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.
Returns
VersionInfo
Throws
IllegalArgumentException when either arguments are negative or > 255

getInstance

Added in API level 24
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 int: major version, non-negative number <= 255.
minor int: minor version, non-negative number <= 255.
milli int: milli version, non-negative number <= 255.
Returns
VersionInfo
Throws
IllegalArgumentException when either arguments are negative or > 255

getInstance

Added in API level 24
VersionInfo getInstance (int major)

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.
Returns
VersionInfo
Throws
IllegalArgumentException when either arguments are negative or > 255

getInstance

Added in API level 24
VersionInfo getInstance (int major, 
                int minor)

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.
Returns
VersionInfo
Throws
IllegalArgumentException when either arguments are negative or > 255

getMajor

Added in API level 24
int getMajor ()

Returns the major version number

Returns
int the major version number

getMicro

Added in API level 24
int getMicro ()

Returns the micro version number

Returns
int the micro version number

getMilli

Added in API level 24
int getMilli ()

Returns the milli version number

Returns
int the milli version number

getMinor

Added in API level 24
int getMinor ()

Returns the minor version number

Returns
int the minor version number

toString

Added in API level 24
String toString ()

Returns the String representative of VersionInfo in the format of "major.minor.milli.micro"

Returns
String String representative of VersionInfo

Hooray!