com.sun.msv.grammar

Class BinaryExp

public abstract class BinaryExp extends Expression

Base implementation for those expression which has two child expressions.

Author: Kohsuke KAWAGUCHI

Field Summary
Expressionexp1
Expressionexp2
Constructor Summary
BinaryExp(Expression left, Expression right)
Method Summary
Iteratorchildren()
iterates all child expressions.
booleanequals(Object o)
Expression[]getChildren()
returns all child expressions in one array.

Field Detail

exp1

public final Expression exp1

exp2

public final Expression exp2

Constructor Detail

BinaryExp

public BinaryExp(Expression left, Expression right)

Method Detail

children

public 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(Object o)

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.