Class Rules
java.lang.Object
|
+--Rules
- public class Rules
- extends java.lang.Object
This class keeps an axiom (the initiating production) and a Vector of Rules.
Each Rule contains a variable, and a production which the variable stands
for. Rules are retrieved by the Interpreter--given a variable, getRule
passes back the corresponding production.
(called by: Lsystem.java, Interpreter.java);
Constructor Summary |
Rules()
|
Method Summary |
void |
add(java.lang.String str)
|
java.lang.String |
getAxiom()
|
static java.lang.String |
getRule(char ruleChar)
|
void |
setAxiom(java.lang.String str)
|
int |
size()
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Rules
public Rules()
add
public void add(java.lang.String str)
size
public int size()
setAxiom
public void setAxiom(java.lang.String str)
getAxiom
public java.lang.String getAxiom()
getRule
public static java.lang.String getRule(char ruleChar)