public static class ICUService.Key extends Object
Keys provide both a currentDescriptor and a currentID. The descriptor contains an optional prefix, followed by '/' and the currentID. Factories that handle complex keys, for example number format factories that generate multiple kinds of formatters for the same locale, use the descriptor to provide a fully unique identifier for the service object, while using the currentID (in this case, the locale string), as the visible IDs that can be localized.
The default implementation of Key has no fallbacks and has no custom descriptors.
| Constructor and Description |
|---|
Key(String id)
Construct a key from an id.
|
| Modifier and Type | Method and Description |
|---|---|
String |
canonicalID()
Return the canonical version of the original ID.
|
String |
currentDescriptor()
Return the current descriptor.
|
String |
currentID()
Return the (canonical) current ID.
|
boolean |
fallback()
If the key has a fallback, modify the key and return true,
otherwise return false.
|
String |
id()
Return the original ID used to construct this key.
|
boolean |
isFallbackOf(String idToCheck)
If a key created from id would eventually fallback to match the
canonical ID of this key, return true.
|
public Key(String id)
public final String id()
public String canonicalID()
public String currentID()
public String currentDescriptor()
public boolean fallback()
public boolean isFallbackOf(String idToCheck)