|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
PrintGame.InstructionList
class represting a List of instructions which are excecuted by the turing machine.
| Field Summary |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
InstructionList()
|
|
| Method Summary | |
void |
addInstruction(Instruction instruction)
method adds an instruction at the end of an instruction list. |
void |
addInstructionAtPos(int index,
Instruction instruction)
method adds an instruction at the specified position to the instruction list. |
Instruction |
getInstructionAtPos(int index)
method gets an instruction at the specified position in the instruction list. |
void |
removeInstructionAtPos(int index)
method removes the instruction at the specified position. |
| Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
containsAll, remove, removeAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList |
| Constructor Detail |
public InstructionList()
| Method Detail |
public void addInstruction(Instruction instruction)
instruction - instruction to insert
public void addInstructionAtPos(int index,
Instruction instruction)
index - zero based position of the element to add.instruction - instruction to insertpublic Instruction getInstructionAtPos(int index)
index - zero based position of the requested instruction.public void removeInstructionAtPos(int index)
index - zero based position of the element to remove.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||