getTemperatureUnit
Return the user's preference of the temperature unit which is from getDefault. The returned result is resolved and bases on the Locale#getDefault(Locale.Category)
settings. It is one of the strings defined in {@see TemperatureUnit}, e.g. TemperatureUnit#FAHRENHEIT
.
Return the temperature unit of the inputted Locale. It is one of the strings defined in {@see TemperatureUnit}, e.g. TemperatureUnit#FAHRENHEIT
.
Return the user's preference of the temperature unit which is from getDefault, e.g. TemperatureUnit#FAHRENHEIT
.
Return
TemperatureUnit.TemperatureUnits If the malformed temperature unit format was specified in the temperature unit subtag, e.g. en-US-u-mu-temperature, this function returns empty string, i.e. TemperatureUnit#DEFAULT
.
Parameters
If the Locale#getDefault(Locale.Category)
contains temperature unit subtag, this argument is ignored. If the Locale#getDefault(Locale.Category)
doesn't contain temperature unit subtag and the resolved argument is true, this function tries to find the default temperature unit for the Locale#getDefault(Locale.Category)
. If the Locale#getDefault(Locale.Category)
doesn't contain temperature unit subtag and the resolved argument is false, this function returns empty string , i.e. TemperatureUnit#DEFAULT
.
Return the temperature unit of the inputted Locale. E.g. "fahrenheit"
Return
TemperatureUnit.TemperatureUnits If the malformed temperature unit format was specified in the temperature unit subtag, e.g. en-US-u-mu-temperature, this function returns empty string, i.e. TemperatureUnit#DEFAULT
.
Parameters
The Locale to get the temperature unit.
If the given Locale
contains temperature unit subtag, this argument is ignored. If the given Locale
doesn't contain temperature unit subtag and the resolved argument is true, this function tries to find the default temperature unit for the given Locale
. If the given Locale
doesn't contain temperature unit subtag and the resolved argument is false, this function return empty string, i.e. TemperatureUnit#DEFAULT
.