|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.text.mixup.MixupInterpreter
public class MixupInterpreter
Constructor Summary | |
---|---|
MixupInterpreter()
|
|
MixupInterpreter(MixupProgram p)
|
|
MixupInterpreter(MixupProgram p,
MonotonicTextLabels rootLabels)
|
Method Summary | |
---|---|
void |
createLevel(java.lang.String newLevelName,
java.lang.String levelType,
java.lang.String pattern)
Creates a new level. |
void |
eval()
Runs the current program on the current state of labels (current level). |
void |
eval(MonotonicTextLabels labels)
Effectively clears the current state and executes the current program on the specified TextLabels. |
MonotonicTextLabels |
getCurrentLabels()
Returns the TextLabels associated with the current level |
java.lang.String |
getCurrentLevel()
Returns the name of the current level or null if no TextLabels have been added or created because the program has not yet been evaluated. |
MonotonicTextLabels |
getLabelsForLevel(java.lang.String level)
Returns the TextLabels associated with the given level name or null if the level doesn't exist |
MixupProgram |
getProgram()
Returns the MixupProgram that this interpreter will execute if the eval method is called. |
void |
importLabelsFromLevel(java.lang.String importLevel,
java.lang.String oldType,
java.lang.String newType)
imports labels from specified level to the current level |
void |
offLevel(java.lang.String levelName)
Moves up one level in the stack of labels |
void |
onLevel(java.lang.String levelName)
Makes the current level be the given level name. |
void |
setProgram(MixupProgram p)
Sets the MixupProgram that this interpreter will execute when the eval method is called. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MixupInterpreter()
public MixupInterpreter(MixupProgram p)
public MixupInterpreter(MixupProgram p, MonotonicTextLabels rootLabels)
Method Detail |
---|
public void eval(MonotonicTextLabels labels)
public void eval()
public void setProgram(MixupProgram p)
public MixupProgram getProgram()
public MonotonicTextLabels getLabelsForLevel(java.lang.String level)
public java.lang.String getCurrentLevel()
public MonotonicTextLabels getCurrentLabels()
public void onLevel(java.lang.String levelName)
public void offLevel(java.lang.String levelName)
public void createLevel(java.lang.String newLevelName, java.lang.String levelType, java.lang.String pattern)
public void importLabelsFromLevel(java.lang.String importLevel, java.lang.String oldType, java.lang.String newType)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |