public class Block extends java.lang.Object implements CallableType, java.lang.Iterable<Operation>, Saveable
Constructor and Description |
---|
Block()
Creates a new empty block.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Operation statement)
Adds a statement to the block.
|
static Block |
create(java.io.InputStream in)
Creates this object from an input stream, expecting its byte representation.
|
void |
execute(TAMERequest request,
TAMEResponse response,
ValueSet blockLocal)
Executes something that can change the request and response.
|
int |
getCount() |
java.util.Iterator<Operation> |
iterator() |
void |
readBytes(java.io.InputStream in)
Imports this object from bytes.
|
java.lang.String |
toString() |
void |
writeBytes(java.io.OutputStream out)
Exports this object to bytes.
|
public void add(Operation statement)
statement
- the statement to add.public java.util.Iterator<Operation> iterator()
iterator
in interface java.lang.Iterable<Operation>
public int getCount()
public void execute(TAMERequest request, TAMEResponse response, ValueSet blockLocal) throws TAMEInterrupt
CallableType
execute
in interface CallableType
request
- the request object.response
- the response object.blockLocal
- the block local variable bank.TAMEInterrupt
- if an interrupt occurs.public java.lang.String toString()
toString
in class java.lang.Object
public static Block create(java.io.InputStream in) throws java.io.IOException
in
- the input stream to read from.java.io.IOException
- if a read error occurs.public void writeBytes(java.io.OutputStream out) throws java.io.IOException
Saveable
writeBytes
in interface Saveable
out
- the output stream to write to.java.io.IOException
- if a write problem occurs.public void readBytes(java.io.InputStream in) throws java.io.IOException
Saveable