|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmodel.InstructionSet<STATE,SYMBOL>
STATE
- States domainSYMBOL
- Symbols domainpublic class InstructionSet<STATE,SYMBOL>
An HashMap containing all the instruction. It is possible to extract an instruction by his current state and the read symbol Copyright (C) 2011 Federico "MrModd" Cosentino (http://mrmodd.it/)
Field Summary | |
---|---|
private static long |
serialVersionUID
|
private java.util.HashMap<STATE,java.util.HashMap<SYMBOL,Instruction>> |
states
|
Constructor Summary | |
---|---|
InstructionSet()
Create the set |
Method Summary | |
---|---|
void |
add(Instruction i)
Add an instruction |
void |
erase()
Delete all the content of this set |
Instruction |
get(STATE q,
SYMBOL s)
Extract an instruction |
Instruction |
remove(STATE q,
SYMBOL s)
Remove an instruction |
int |
size()
Determine the number of the instructions contained in this set |
Instruction[] |
toArray()
Extract all the instruction ad put them on an array |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private java.util.HashMap<STATE,java.util.HashMap<SYMBOL,Instruction>> states
Constructor Detail |
---|
public InstructionSet()
Method Detail |
---|
public void add(Instruction i)
i
- the instruction to addpublic Instruction get(STATE q, SYMBOL s)
q
- the current state of the instructions
- the read symbol of the instruction
public Instruction remove(STATE q, SYMBOL s)
q
- the current state of the instructions
- the read symbol of the instruction
public int size()
public Instruction[] toArray()
public void erase()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |