|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pf.nls.TextContainer
public class TextContainer
This is is a simple container for text strings associated with an identifying key. It also allows to set a default TextContainer which will be checked for a key if this container cannot find it.
| Constructor Summary | |
|---|---|
TextContainer(java.util.Locale aLocale)
Initialize the new instance with default values. |
|
| Method Summary | |
|---|---|
boolean |
containsKey(java.lang.String key)
Returns true if this container or its default container can provide a text for the specified key. |
boolean |
containsNothing()
Returns true if this container holds no text and also its default container contains nothing. |
IExtendedTextProvider |
getDefaultProvider()
Returns the default container that will be used if a key cannot be found in this container. |
java.lang.String[] |
getKeys()
Returns an array with all keys of this container. |
java.util.Locale |
getLocale()
Returns the locale for which this container holds the text strings |
java.util.Locale[] |
getLocales()
Returns the locales for which this text provider has text |
java.lang.String |
getText(java.lang.String key)
Returns the text associated with the given key or null if the key cannot be found. |
boolean |
hasKey(java.lang.String key)
Returns true if this container can provide a text for the specified key. |
boolean |
isEmpty()
Returns true if this container holds no text. |
void |
setDefaultProvider(IExtendedTextProvider textContainer)
Sets the default container. |
int |
size()
Returns the number of entries in this container. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TextContainer(java.util.Locale aLocale)
| Method Detail |
|---|
public IExtendedTextProvider getDefaultProvider()
public void setDefaultProvider(IExtendedTextProvider textContainer)
textContainer - A new default container or null to remove any existingpublic java.util.Locale getLocale()
public java.lang.String getText(java.lang.String key)
getText in interface ITextProviderkey - The identifier for the textpublic java.util.Locale[] getLocales()
getLocales in interface IExtendedTextProviderpublic java.lang.String[] getKeys()
public boolean containsKey(java.lang.String key)
key - The key to lookuphasKey(String)public boolean hasKey(java.lang.String key)
key - The key to lookupcontainsKey(String)public boolean isEmpty()
containsNothing()public boolean containsNothing()
containsNothing in interface IExtendedTextProviderisEmpty()public int size()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||