文档管理中心

LocaleProfile

java.lang.Object

|---ohos.global.configuration.LocaleProfile

public class LocaleProfile
extends Object
Provides a profile of system locale settings.

The profile includes an array of user-preferred locales.

Since:

3

Constructor Summary

展开

Constructor

Description

LocaleProfile​(Locale[] locales)

A constructor used to create a LocaleProfile instance based on an array of locales.

Method Summary

展开

Modifier and Type

Method

Description

boolean

equals​(Object object)

Check whether the provided LocaleProfile is equal to the current localeProfile or not.

Locale[]

getLocales​()

Obtains the array of locales.

int

hashCode​()

Obtains hashcode of the locales array.

String

toString​()

Converts the locales array to string.

展开

Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

LocaleProfile

public LocaleProfile​(Locale[] locales)

A constructor used to create a LocaleProfile instance based on an array of locales.

Parameters:

展开

Parameter Name

Parameter Description

locales

Indicates the array of locales.

Since:

3

Method Detail

getLocales

public Locale[] getLocales​()

Obtains the array of locales.

Returns:

Returns a cloned copy of the array of locales.

equals

public boolean equals​(Object object)

Check whether the provided LocaleProfile is equal to the current localeProfile or not.

Overrides:

equals in class Object

Parameters:

展开

Parameter Name

Parameter Description

object

the provided LocaleProfile

Returns:

true if the provided LocaleProfile is equal to the current localeProfile, vice versa.

See Also:

Object.hashCode(), HashMap

hashCode

public int hashCode​()

Obtains hashcode of the locales array.

Overrides:

hashCode in class Object

Returns:

hashcode of the locales array.

See Also:

Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)

toString

public String toString​()

Converts the locales array to string.

Overrides:

toString in class Object

Returns:

the locales array in string format.

搜索
请输入您想要搜索的关键词