FileDocCategorySizeDatePackage
PTDictionaryImpl.javaAPI DocphoneME MR2 API (J2ME)2919Wed May 02 18:00:22 BST 2007com.sun.midp.chameleon.input

PTDictionaryImpl

public class PTDictionaryImpl extends Object implements PTDictionary
Machine dependent API to predictive text library This implementation assumes that predictive text library loaded and handled by platfrom. As a result this class serves just as a Iteraror factory

Fields Summary
private String
language
library language
private int
handle
Library handle. It's given out during library initialization
private PTIterator
iterator
library iterator
Constructors Summary
public PTDictionaryImpl(String lang)
call ptInitLibrary0() on 1st execution

param
lang current language

        language = lang;
        handle = ptInitLibrary0(lang);
    
Methods Summary
public booleanaddWord(java.lang.String word)
adding words to the predictive text dictionary is not supported on the platform. Returns false always

param
word new word to add
return
false (not supported on the platform)

        return false;
    
public booleanisValid()
check if current handle is valid

return
true is valid, false otherwise

        return handle > 0;
    
public PTIteratoriterator()
get a machine dependent predictive text Iterattor

return
an iterator of the class IteratorImpl

        if (iterator == null && isValid())
            iterator = new PTIteratorImpl(handle);
        return iterator;
    
private static native intptInitLibrary0(java.lang.String lang)
Called 1st time predictive text library is accessed. it calls platform specific predictive text initialization functions

param
lang the language used to select the library
return
the handle of the library