Build 1.0_r1(from source)

android.speech.recognition.impl
Class SrecGrammarImpl

java.lang.Object
  extended by android.speech.recognition.impl.GrammarImpl
      extended by android.speech.recognition.impl.EmbeddedGrammarImpl
          extended by android.speech.recognition.impl.SrecGrammarImpl
All Implemented Interfaces:
EmbeddedGrammar, Grammar, SrecGrammar, Runnable

public class SrecGrammarImpl
extends EmbeddedGrammarImpl
implements SrecGrammar


Nested Class Summary
 
Nested classes/interfaces inherited from interface android.speech.recognition.SrecGrammar
SrecGrammar.Item
 
Field Summary
 
Fields inherited from class android.speech.recognition.impl.GrammarImpl
nativeObject
 
Constructor Summary
SrecGrammarImpl(long nativeObject)
          Creates a new SrecGrammarImpl.
 
Method Summary
 void addItem(String slotName, SlotItem item, int weight, String semanticValue)
          Adds an item to a slot.
 void addItemList(String slotName, Vector<SrecGrammar.Item> items)
          Add a list of item to a slot.
 
Methods inherited from class android.speech.recognition.impl.EmbeddedGrammarImpl
compileAllSlots, resetAllSlots, save
 
Methods inherited from class android.speech.recognition.impl.GrammarImpl
dispose, finalize, getNativeObject, load, run, unload
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface android.speech.recognition.EmbeddedGrammar
compileAllSlots, resetAllSlots, save
 
Methods inherited from interface android.speech.recognition.Grammar
dispose, load, unload
 

Constructor Detail

SrecGrammarImpl

public SrecGrammarImpl(long nativeObject)
Creates a new SrecGrammarImpl.

Parameters:
nativeObject - the native object
Method Detail

addItem

public void addItem(String slotName,
                    SlotItem item,
                    int weight,
                    String semanticValue)
Description copied from interface: SrecGrammar
Adds an item to a slot.

Specified by:
addItem in interface SrecGrammar
Parameters:
slotName - the name of the slot
item - the item to add to the slot.
weight - the weight of the item. Smaller values are more likely to get recognized. This should be >= 0.
semanticValue - the value that will be returned if this item is recognized.

addItemList

public void addItemList(String slotName,
                        Vector<SrecGrammar.Item> items)
Description copied from interface: SrecGrammar
Add a list of item to a slot.

Specified by:
addItemList in interface SrecGrammar
Parameters:
slotName - the name of the slot
items - the vector of SrecGrammar.Item to add to the slot.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature