public static class LocalePriorityList.Builder
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
LocalePriorityList.Builder |
add(LocalePriorityList languagePriorityList)
Adds a LocalePriorityList
|
LocalePriorityList.Builder |
add(java.lang.String acceptLanguageList)
Adds rfc2616 list.
|
LocalePriorityList.Builder |
add(ULocale... languageCodes)
Adds language codes, with each having weight = 1.0.
|
LocalePriorityList.Builder |
add(ULocale languageCode)
Adds a new language code, with weight = 1.0.
|
LocalePriorityList.Builder |
add(ULocale languageCode,
double weight)
Adds a new supported languageCode, with specified weight.
|
LocalePriorityList |
build()
Creates a LocalePriorityList.
|
LocalePriorityList |
build(boolean preserveWeights)
Creates a LocalePriorityList.
|
public LocalePriorityList build()
Builder.build(false).public LocalePriorityList build(boolean preserveWeights)
preserveWeights - when true, the weights originally came
from a language priority list specified by add() are preserved.public LocalePriorityList.Builder add(LocalePriorityList languagePriorityList)
languagePriorityList - a LocalePriorityListpublic LocalePriorityList.Builder add(ULocale languageCode)
languageCode - to add with weight 1.0public LocalePriorityList.Builder add(ULocale... languageCodes)
languageCodes - List of language codes.public LocalePriorityList.Builder add(ULocale languageCode, double weight)
languageCode - language/locale to addweight - value between 0.0 and 1.1public LocalePriorityList.Builder add(java.lang.String acceptLanguageList)
acceptLanguageList - in rfc2616 formatCopyright © 2016 Unicode, Inc. and others.