com.varankin.bnf
Class SyntacticFactor
java.lang.Object
com.varankin.bnf.SyntacticFactor
public class SyntacticFactor
- extends java.lang.Object
A syntactic-factor consists of either:
(a) an integer followed by a repetition-symbol followed
by a syntactic-primary, or
(b) a syntactic-primary.
- Author:
- © 2009 Nikolai Varankine
Method Summary |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
repeat
public final int repeat
- Number of times enclosed syntactic primary must repeat.
primary
public final SyntacticPrimary primary
- Implementing syntactic primary.
SyntacticFactor
public SyntacticFactor(int aRepeat,
SyntacticPrimary aPrimary)
- Parameters:
aRepeat
- positive number of times (factor) specified syntactic primary must repeat.aPrimary
- syntactic primary which repetitions comprise this syntactic factor.
- Throws:
java.lang.NullPointerException
- if syntactic primary is null.
java.lang.IllegalArgumentException
- if factor is not a positive number.
SyntacticFactor
public SyntacticFactor(SyntacticPrimary aPrimary)
- Parameters:
aPrimary
- syntactic primary comprising this syntactic factor as single instance.
- Throws:
java.lang.NullPointerException
- if syntactic primary is null.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object