|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.artima.place.info.LocalizableInfo | +--com.artima.place.info.Name
A localizable name.
Constructor Summary | |
Name(java.util.Locale cachedLocale,
java.lang.String cachedName)
Constructs a new Name with passed cached name for the
passed locale, and no name key and resource bundle loader. |
|
Name(ResourceBundleLoader loader,
java.lang.String nameKey)
Constructs a new Name with passed resource bundle
loader, name key, and no cached name. |
|
Name(ResourceBundleLoader loader,
java.lang.String nameKey,
java.util.Locale cachedLocale,
java.lang.String cachedName)
Constructs a new Name with passed resource bundle
loader, name key, and cached name (for the passed locale). |
Method Summary | |
java.lang.Object |
clone()
Clones this Name . |
boolean |
equals(java.lang.Object o)
Compares this Name to the passed object for equality. |
java.lang.String |
getName()
Returns a String name, suitable for presentation to
users, appropriate to the default locale. |
java.lang.String |
getName(java.util.Locale desiredLocale)
Returns a String name, suitable for presentation to
users, which represents the best-fit name for the specified locale. |
int |
hashCode()
Returns a hash code for this object. |
void |
purge()
Purge away information about undesired locales. |
void |
purge(java.util.Locale preserveLocale)
Purge away information about all locales except the passed locale. |
Methods inherited from class com.artima.place.info.LocalizableInfo |
clearCachedLocale, clearResourceBundleLoader, compareObjectsOrNull, getBestFitLocale, getBestFitLocale, getCachedLocale, getResourceBundleLoader, getSupportedLocales, hasCachedLocale, hasResourceBundleLoader, setCachedLocale, stripResourceBundleLoader, useCache |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Name(ResourceBundleLoader loader, java.lang.String nameKey)
Name
with passed resource bundle
loader, name key, and no cached name.loader
- the ResourceBundleLoader
which can load
ResourceBundle
s for this Name
.nameKey
- the String
key with which the
String
resource can be retrieved from a
ResourceBundle
provided by the
ResourceBundleLoader
public Name(ResourceBundleLoader loader, java.lang.String nameKey, java.util.Locale cachedLocale, java.lang.String cachedName)
Name
with passed resource bundle
loader, name key, and cached name (for the passed locale).loader
- the ResourceBundleLoader
which can load
ResourceBundle
s for this Name
.nameKey
- the String
key with which the
String
resource can be retrieved from a
ResourceBundle
provided by the
ResourceBundleLoader
cachedLocale
- the Locale
of the name
passed as cachedName
.cachedName
- the name whose locale is passed as
cachedLocale
that should be cached by this
Name
.public Name(java.util.Locale cachedLocale, java.lang.String cachedName)
Name
with passed cached name for the
passed locale, and no name key and resource bundle loader. (Because
this Name
info object contains no resource bundle
loader, it also requires no key with which to look up a name resource
in a resource bundle.cachedLocale
- the Locale
of the name
passed as cachedName
.cachedName
- the name whose locale is passed as
cachedLocale
that should be cached by this
Name
.Method Detail |
public java.lang.String getName()
String
name, suitable for presentation to
users, appropriate to the default locale.String
name, suitable for presentation to
users, appropriate to the default locale.MissingResourceException
- if a codebase URL is found to be
unusable. (Because URLString
enforces well-formedness
of all URLs used by this method, this exception probably indicates
the protocol was unknown.), or if a ResourceBundle
is
not found at the expected codebasepublic java.lang.String getName(java.util.Locale desiredLocale)
String
name, suitable for presentation to
users, which represents the best-fit name for the specified locale.String
name, suitable for presentation to
users, which represents the best-fit name for the specified
locale.MissingResourceException
- if a codebase URL is found to be
unusable. (Because URLString
enforces well-formedness
of all URLs used by this method, this exception probably indicates
the protocol was unknown.), or if a ResourceBundle
is
not found at the expected codebasepublic void purge()
purge
in class LocalizableInfo
public void purge(java.util.Locale preserveLocale)
purge
in class LocalizableInfo
preserveLocale
- a locale to preserve in this Name
.public boolean equals(java.lang.Object o)
Name
to the passed object for equality. To
be semantically equal, the class of the passed object must be
Name
, the passed object's cached name must be
semantically equal to this object's cached name, the passed object's
name key must be semantically to this object's name key, and
the equals
method of Name
's superclass must
return true
.equals
in class LocalizableInfo
An
- object to compare to this Name
true
if this Name
is
semantically equal to the passed Name
public int hashCode()
hashCode
in class LocalizableInfo
public java.lang.Object clone()
Name
.clone
in class LocalizableInfo
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |