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
Rule
object is the basic component of a
RuleGrammar
and represents anything that may appear
on the right-hand side of a rule definition in
Java Speech Grammar Format. Technically a Rule
represents a JSGF "expansion".
Rule
is an abstract class that is sub-classed by:
RuleAlternatives
: set of alternatives Rule
objects
RuleCount
: contains a Rule
that may occur optionally,
zero or more times, or one or more times.
RuleName
: reference to a Rule
RuleSequence
: set of rules that occur in sequence
RuleTag
: contains a Rule
tagged by a String
RuleToken
: reference to a token that may be spoken.
Rule
is RuleParse
which
is returned by the parse method of RuleGrammar
to
represent the structure of parsed text.
Any Rule
object can be converted to a partial
Java Speech Grammar Format String using its toString
method.
Constructor Summary | |
Rule()
|
Method Summary | |
Rule | copy()
Return a deep copy of a Rule .
|
String | toString()
Return a string representing the Rule in
partial Java Speech Grammar Format.
|
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Constructor Detail |
public Rule()
Method Detail |
public abstract Rule copy()
Rule
.
A deep copy implies that for a rule that contains
other rules (i.e. RuleAlternatives
,
RuleCount
, RuleParse
,
RuleSequence
, RuleTag
)
the sub-rules are also copied.
Note: copy differs from the typical use of clone
because a clone is not normally a deep copy.public abstract String toString()
Rule
in
partial Java Speech Grammar Format.
The String
represents a portion of
Java Speech Grammar Format that could appear
on the right hand side of a rule definition.
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