Constructor and Description |
---|
DelayedResult(DelayedResult dResult) |
DelayedResult(Result result,
int delay) |
Modifier and Type | Method and Description |
---|---|
DelayedResult |
deepClone()
Deep clone a result
|
int |
getDelay() |
static int |
getMaxDelay() |
Result |
getResult() |
void |
reduceDelay() |
Tunnel |
selectTunnel(Membrane current)
Select which tunnel this result will go through
|
void |
setDelay(int delay) |
void |
setResult(Membrane membrane,
int times)
Set the result to target membrane
|
void |
setResult(Result result) |
java.lang.String |
toString() |
public DelayedResult(Result result, int delay)
public DelayedResult(DelayedResult dResult)
public void setResult(Membrane membrane, int times) throws UnknownMembraneClassException, TimesException
Result
setResult
in interface Result
membrane
- target membranetimes
- set result timesUnknownMembraneClassException
- if membrane class can not be found while creating an instanceTimesException
public DelayedResult deepClone()
Result
public Tunnel selectTunnel(Membrane current) throws TunnelNotExistException
Result
selectTunnel
in interface Result
current
- current membraneTunnelNotExistException
- if tunnel doesn't exist and cannot be createdpublic int getDelay()
public void reduceDelay()
public void setDelay(int delay)
public java.lang.String toString()
toString
in class java.lang.Object
public Result getResult()
public void setResult(Result result)
public static int getMaxDelay()