Build 1.0_r1(from source)

android.speech.recognition
Class WordItem

java.lang.Object
  extended by android.speech.recognition.WordItem
All Implemented Interfaces:
SlotItem
Direct Known Subclasses:
WordItemImpl

public abstract class WordItem
extends Object
implements SlotItem

Word that may be inserted into an embedded grammar slot.


Constructor Summary
WordItem()
           
 
Method Summary
static WordItem valueOf(String word, String pronunciation)
          Creates a new WordItem.
static WordItem valueOf(String word, String[] pronunciations)
          Creates a new WordItem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordItem

public WordItem()
Method Detail

valueOf

public static WordItem valueOf(String word,
                               String[] pronunciations)
                        throws IllegalArgumentException
Creates a new WordItem.

Parameters:
word - the word to insert
pronunciations - the pronunciations to associated with the item. If the list is is empty (example:new String[0]) the recognizer will attempt to guess the pronunciations.
Returns:
the WordItem
Throws:
IllegalArgumentException - if word is null or if pronunciations is null or pronunciations contains an element equal to null or empty string.

valueOf

public static WordItem valueOf(String word,
                               String pronunciation)
                        throws IllegalArgumentException
Creates a new WordItem.

Parameters:
word - the word to insert
pronunciation - the pronunciation to associate with the item. If it is null the recognizer will attempt to guess the pronunciations.
Returns:
the WordItem
Throws:
IllegalArgumentException - if word is null or if pronunciation is an empty string

Build 1.0_r1(from source)

Please submit a feedback, bug or feature