|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjelan.elan.GrammarElement
jelan.elan.instruction.Instruction
jelan.elan.instruction.StrictInstructionList
public class StrictInstructionList
A list of instructions that doesn't include a function definition. This is the definition of Strict, an instruction list can include any instruction, including a function definition, whereas a strict instruction list doesn't include these.
Constructing a strict instruction list is usually accomplished by creating an
object and repeatedly calling add
to add new instructions. The
order in which instructions are added is the order in which they'll be
executed.
Constructor Summary | |
---|---|
StrictInstructionList()
Construct an empty list. |
Method Summary | |
---|---|
void |
add(Instruction i)
Add an instruction to this list (FIFO order for execution). |
java.lang.Object |
evaluate(Context c)
Evaluate this instruction in a Context, return the result of the evaluation (the result is the last instruction executed). |
java.util.Iterator<Instruction> |
iterator()
Return an iterator for accessing all the instructions. |
java.lang.String |
toString()
Return a string indicating the # of instructions in the list |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StrictInstructionList()
Method Detail |
---|
public void add(Instruction i)
i
- the instruction added.public java.lang.Object evaluate(Context c)
evaluate
in class Instruction
c
- the context for the evaluation
public java.util.Iterator<Instruction> iterator()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |