FileDocCategorySizeDatePackage
PTDictionaryFactory.javaAPI DocphoneME MR2 API (J2ME)2081Wed May 02 18:00:20 BST 2007com.sun.midp.chameleon.input

PTDictionaryFactory

public class PTDictionaryFactory extends Object
Factory to get the dictionary for predictive text

Fields Summary
static final Hashtable
pool
pool of initialized library for the current session
Constructors Summary
Methods Summary
public static PTDictionarygetDictionary()
Get a dictionary for default default. The language string format is platform specific.

return
a predictive text dictionary

    
                           
        
        return getDictionary("default");
    
public static PTDictionarygetDictionary(java.lang.String lang)
Get a dictionary for specified language

param
lang language of dictionary
return
a predictive text dictionary

        PTDictionary dic = null;
        if (!pool.containsKey(lang)) {
            dic = new PTDictionaryImpl(lang);
            pool.put(lang, dic);
        } else {
            dic = (PTDictionary)pool.get(lang);
        }
        return dic;