Package 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.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description Expression
exp1
Expression
exp2
private static long
serialVersionUID
-
Fields inherited from class com.sun.msv.grammar.Expression
anyString, epsilon, nullSet, verifierTag
-
-
Constructor Summary
Constructors Constructor Description BinaryExp(Expression left, Expression right)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
calcHashCode()
Computes the hashCode again.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
calcEpsilonReducibility, getExpandedExp, hashCode, hashCode, hashCode, isEpsilonReducible, peelOccurence, readResolve, visit, visit, visit, visit, visit, visit, visit, visit
-
-
-
-
Field Detail
-
exp1
public final Expression exp1
-
exp2
public final Expression exp2
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BinaryExp
public BinaryExp(Expression left, Expression right)
-
-
Method Detail
-
calcHashCode
protected final int calcHashCode()
Description copied from class:Expression
Computes the hashCode again.This method and the parameter to the constructor has to be the same. This method is used when the object is being read from the stream.
- Specified by:
calcHashCode
in classExpression
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in classExpression
-
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.
-
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)
-
-