|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.locale4j.storage.HashTableStore
public class HashTableStore
In memory storage of locale data using HashTables.
| Constructor Summary | |
|---|---|
HashTableStore()
Default Constructor. |
|
| Method Summary | |
|---|---|
void |
addLocale(Locale locale)
Adds the specified locale to the store without any key/value pairs. |
String |
get(Locale locale,
String key)
Fetches a string in the language specified by the locale. |
List<String> |
getKeys(Locale locale)
Fetch a list of keys for the given locale. |
List<Locale> |
getLocales()
Fetch a list of locales for which translations exist. |
Hashtable<String,Hashtable<String,String>> |
getTable()
|
void |
put(Locale locale,
String key,
String text)
Stores a string in the language specified by the locale. |
Object |
removeKey(Locale locale,
String key)
Removes a string from the language specified by the locale. |
Object |
removeLocale(Locale locale)
Removes an entire locale. |
void |
setTable(Hashtable<String,Hashtable<String,String>> newTable)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HashTableStore()
| Method Detail |
|---|
public final Hashtable<String,Hashtable<String,String>> getTable()
public final void setTable(Hashtable<String,Hashtable<String,String>> newTable)
newTable - the table to set
public String get(Locale locale,
String key)
get in interface LocaleStorelocale - the locale for which the String is localized.key - the key used to reference the stored String.
public void put(Locale locale,
String key,
String text)
put in interface LocaleStorelocale - the locale for which the String is localized.key - the key used to reference the stored String.text - the String to store.public void addLocale(Locale locale)
addLocale in interface LocaleStorelocale - public List<Locale> getLocales()
getLocales in interface LocaleStorepublic List<String> getKeys(Locale locale)
getKeys in interface LocaleStorelocale - the locale of the Strings the keys point to.
public Object removeKey(Locale locale,
String key)
throws Exception
removeKey in interface LocaleStorelocale - the locale for which the String is localized.key - the key used to reference the stored String.
Exception
public Object removeLocale(Locale locale)
throws Exception
removeLocale in interface LocaleStorelocale - the locale to remove.
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||