|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.util.LocalizedString
org.mmbase.util.ReplacingLocalizedString
Extends and wraps LocalizedString. It extends to look like a 'normal' LocalizedString, but it overrides 'get' to do token-replacements first. This functionality is not in LocalizedString itself, because now you can have different replacements on the same value set represented by a LocalizedString withouth having to copy everything every time.
| Constructor Summary | |
protected |
ReplacingLocalizedString()
|
|
ReplacingLocalizedString(LocalizedString s)
|
| Method Summary | |
Map |
asMap()
Returns a Map representation of the localisation setting represented by this LocalizedString. It is an unmodifiable mapping: Locale -> localized value. Also takes into account the replacements in the values (but only 'lazily', when actually requested). |
Object |
clone()
|
String |
get(Locale locale)
Gets the value for a certain locale. |
String |
getKey()
Gets the key to use as a default and/or for obtaining a value from the bundle |
static void |
main(String[] argv)
|
static String |
makeLiteral(String s)
Utility method for second argument of replaceAll |
protected String |
replace(String input)
|
void |
replaceAll(String regexp,
String replacement)
|
void |
set(String value,
Locale locale)
Sets the value for a certain locale. |
void |
setBundle(String b)
A resource-bundle with given name can be associated to this LocalizedString. |
void |
setKey(String key)
Sets the key to use as a default and/or for obtaining a value from the bundle |
String |
toString()
For LocalizedString this returns the String for the default Locale (see LocalizedString.getDefault()).
For LocalizedString this returns the String for the default Locale (see LocalizedString.getDefault()). |
| Methods inherited from class org.mmbase.util.LocalizedString |
equals, fillFromXml, getDefault, getLocale, getLocale, getXmlLang, hashCode, setDefault, setXmlLang, toStrings, toXml |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected ReplacingLocalizedString()
public ReplacingLocalizedString(LocalizedString s)
s - The wrapped LocalizedString.| Method Detail |
public void replaceAll(String regexp,
String replacement)
protected String replace(String input)
public String getKey()
LocalizedString
getKey in class LocalizedStringpublic void setKey(String key)
LocalizedString
setKey in class LocalizedStringpublic String get(Locale locale)
LocalizedString
get in class LocalizedString
public void set(String value,
Locale locale)
LocalizedString
set in class LocalizedStringpublic Map asMap()
asMap in class LocalizedStringpublic void setBundle(String b)
LocalizedString
setBundle in class LocalizedStringpublic String toString()
LocalizedStringLocalizedString.getDefault()).
toString in class LocalizedStringpublic Object clone()
clone in class LocalizedStringpublic static String makeLiteral(String s)
public static void main(String[] argv)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||