Skip to content
Snippets Groups Projects
Commit 7a74aa70 authored by Nelson Tavares de Sousa's avatar Nelson Tavares de Sousa
Browse files

added JavaDoc to AbstractStage

parent 259d35c1
No related branches found
No related tags found
No related merge requests found
......@@ -32,10 +32,20 @@ public abstract class AbstractStage extends Stage {
}
}
/**
* Returns an Array of InputPorts associated with the according Stage.
*
* @return Array of InputPorts
*/
protected InputPort<?>[] getInputPorts() {
return this.cachedInputPorts;
}
/**
* Returns an Array of OutputPorts associated with the according Stage.
*
* @return Array of OutputPorts
*/
protected OutputPort<?>[] getOutputPorts() {
return this.cachedOutputPorts;
}
......@@ -54,6 +64,15 @@ public abstract class AbstractStage extends Stage {
}
}
/**
* This method checks, if the signal was already sent to the Stage
*
* @param signal
* Arriving signal
* @param inputPort
* InputPort which received the signal
* @return true if stage already evaluated the signal, false otherwise
*/
protected boolean alreadyVisited(final ISignal signal, final InputPort<?> inputPort) {
if (this.triggeredSignals.contains(signal)) {
this.logger.trace("Got signal: " + signal + " again from input port: " + inputPort);
......@@ -80,6 +99,11 @@ public abstract class AbstractStage extends Stage {
this.terminate();
}
/**
* Creates and adds an InputPort to the stage
*
* @return Newly added InputPort
*/
protected <T> InputPort<T> createInputPort() {
final InputPort<T> inputPort = new InputPort<T>(this);
// inputPort.setType(portType);
......@@ -87,6 +111,11 @@ public abstract class AbstractStage extends Stage {
return inputPort;
}
/**
* Creates and adds an OutputPort to the stage
*
* @return Newly added OutputPort
*/
protected <T> OutputPort<T> createOutputPort() {
final OutputPort<T> outputPort = new OutputPort<T>();
// outputPort.setType(portType);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment