public static class ICUService.SimpleFactory extends Object implements ICUService.Factory
| Modifier and Type | Field and Description |
|---|---|
protected String |
id |
protected Object |
instance |
protected boolean |
visible |
| Constructor and Description |
|---|
SimpleFactory(Object instance,
String id)
Convenience constructor that calls SimpleFactory(Object, String, boolean)
with visible true.
|
SimpleFactory(Object instance,
String id,
boolean visible)
Construct a simple factory that maps a single id to a single
service instance.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
create(ICUService.Key key,
ICUService service)
Return the service instance if the factory's id is equal to
the key's currentID.
|
String |
getDisplayName(String identifier,
ULocale locale)
If this.id equals id, returns id regardless of locale,
otherwise returns null.
|
String |
toString()
For debugging.
|
void |
updateVisibleIDs(Map<String,ICUService.Factory> result)
If visible, adds a mapping from id -> this to the result,
otherwise removes id from result.
|
protected Object instance
protected String id
protected boolean visible
public SimpleFactory(Object instance, String id)
public Object create(ICUService.Key key, ICUService service)
create in interface ICUService.Factorypublic void updateVisibleIDs(Map<String,ICUService.Factory> result)
updateVisibleIDs in interface ICUService.Factorypublic String getDisplayName(String identifier, ULocale locale)
getDisplayName in interface ICUService.Factory