Overview | Package | Class | Tree | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class javax.speech.recognition.Rule

java.lang.Object
  |
  +--javax.speech.recognition.Rule
Subclasses:
RuleAlternatives, RuleCount, RuleName, RuleParse, RuleSequence, RuleTag, RuleToken

public abstract class Rule
extends Object
implements Serializable
A 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:

Another sub-class of 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.

See Also:
RuleAlternatives, RuleCount, RuleGrammar, RuleName, RuleParse, RuleSequence, RuleTag, RuleToken, Serialized Form

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

Rule

public Rule()
Method Detail

copy

public abstract Rule copy()
Return a deep copy of a 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.

toString

public abstract String toString()
Return a string representing the 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.

Returns:
printable Java Speech Grammar Format string
Overrides:
toString in class Object

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