com.sun.msv.grammar
Class BinaryExp
java.lang.Object
com.sun.msv.grammar.Expression
com.sun.msv.grammar.BinaryExp
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- ChoiceExp, ConcurExp, InterleaveExp, SequenceExp
- public abstract class BinaryExp
- extends Expression
Base implementation for those expression which has two child expressions.
- Author:
- Kohsuke KAWAGUCHI
- See Also:
- Serialized Form
Method Summary |
java.util.Iterator |
children()
iterates all child expressions. |
boolean |
equals(java.lang.Object o)
|
Expression[] |
getChildren()
returns all child expressions in one array. |
Methods inherited from class com.sun.msv.grammar.Expression |
getExpandedExp, hashCode, isEpsilonReducible, peelOccurence, visit, visit, visit, visit, visit, visit, visit, visit |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
exp1
public final Expression exp1
exp2
public final Expression exp2
BinaryExp
public BinaryExp(Expression left,
Expression right,
int hashKey)
children
public java.util.Iterator children()
- iterates all child expressions.
Since expressions are binarized, expressions like A|B|C is modeled as
A|(B|C). This is may not be preferable for some applications.
This method returns an iterator that iterates all children
(A,B, and C in this example)
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in class Expression
getChildren
public Expression[] getChildren()
- returns all child expressions in one array.
This method is similar to the children method but it returns an array
that contains all children instead of an iterator object.
Copyright © 2001-2003 Sun Microsystems, Inc. Documenation generated April 26 2005.