Overview | Package | Class | Tree | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.speech.recognition.Rule | +--javax.speech.recognition.RuleSequence
RuleSequence
is a Rule
composed of a sequence of
sub-rules that must each be spoken in order. If there are zero rules in the
sequence, the sequence is equivalent to
<NULL>
.
Field Summary | |
Rule[] | rules
Set of rules to be spoken in sequence. |
Constructor Summary | |
RuleSequence(Rule[] rules)
Construct a RuleSequence object with an array of sub-rules. |
|
RuleSequence(Rule rule)
Construct a RuleSequence object containing a single Rule . |
|
RuleSequence()
Empty constructor creates a sequence with zero rules. |
|
RuleSequence(String[] tokens)
Constructor for RuleSequence that is a sequence of
strings that are converted to RuleTokens .
|
Method Summary | |
void | append(Rule rule)
Append a single rule to the end of the sequence. |
Rule | copy()
Return a deep copy of this rule. |
Rule[] | getRules()
Return the array of rules in the sequence. |
void | setRules(Rule[] rules)
Set the array of rules in the sequence. |
String | toString()
Return a String representing this RuleSequence object as partial
Java Speech Grammar Format. |
Methods inherited from class javax.speech.recognition.Rule | |
copy, toString |
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Field Detail |
protected Rule[] rules
Constructor Detail |
public RuleSequence(Rule[] rules)
RuleSequence
object with an array of sub-rules.public RuleSequence(Rule rule)
RuleSequence
object containing a single Rule
.public RuleSequence()
<NULL>
.
public RuleSequence(String[] tokens)
RuleSequence
that is a sequence of
strings that are converted to RuleTokens
.
A string containing multiple words (e.g. "san francisco") is treated as a single token. If appropriate, an application should parse such strings to produce separate tokens.
The token list may be zero-length or null. This will produce a zero-length
sequence which is equivalent to <NULL>
.
Method Detail |
public Rule[] getRules()
public void setRules(Rule[] rules)
<NULL>
.
public void append(Rule rule)
public Rule copy()
Rule.copy
documentation for an explanation of deep copy.public String toString()
RuleSequence
object as partial
Java Speech Grammar Format.Overview | Package | Class | Tree | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaTM Speech API
Copyright 1997-1998 Sun Microsystems, Inc. All rights reserved
Send comments to javaspeech-comments@sun.com