public class BridgeImpl<I,L extends Listener<I>> extends java.lang.Object implements Bridge<I,L>
Modifier and Type | Field and Description |
---|---|
protected GridOutput |
gridOutput |
protected I |
input |
protected java.util.ArrayList<L> |
listeners |
protected java.util.ArrayList<java.lang.String> |
logs |
protected TextOutput |
textOutput |
Constructor and Description |
---|
BridgeImpl() |
BridgeImpl(java.util.ArrayList<L> listeners) |
Modifier and Type | Method and Description |
---|---|
Bridge<I,L> |
addListener(L listener)
Adds a listener to this class
|
Bridge<I,L> |
addLog(java.lang.String log)
Adds a log message
|
BridgeImpl<I,L> |
clearListeners() |
Bridge<I,L> |
clearLog()
Delete all log messages
|
Bridge<I,L> |
notifyInputReady()
Notify all objects connected to the bridge that there is an input ready to be displayed
|
Bridge<I,L> |
notifyLogAdded()
Notify all objects connected to the bridge that there are new log to display
|
Bridge<I,L> |
notifyLogCleared()
Notify all objects connected to the bridge that the log has been cleared
|
Bridge<I,L> |
notifyOutputReady()
Notify all objects connected to the bridge that there is an output ready to be displayed
|
Bridge<I,L> |
setInput(I input)
Set an input object
|
Bridge<I,L> |
setOutput(GridOutput output)
Set the output
|
Bridge<I,L> |
setOutput(TextOutput<?> output)
Set the output
|
protected java.util.ArrayList<java.lang.String> logs
protected I input
protected TextOutput textOutput
protected GridOutput gridOutput
public BridgeImpl()
public BridgeImpl(java.util.ArrayList<L> listeners)
public BridgeImpl<I,L> clearListeners()
public Bridge<I,L> addListener(L listener)
Bridge
public Bridge<I,L> addLog(java.lang.String log)
Bridge
public Bridge<I,L> clearLog()
Bridge
public Bridge<I,L> notifyLogAdded()
Bridge
public Bridge<I,L> notifyLogCleared()
Bridge
public Bridge<I,L> setInput(I input)
Bridge
public Bridge<I,L> notifyInputReady()
Bridge
public Bridge<I,L> setOutput(TextOutput<?> output)
Bridge
public Bridge<I,L> setOutput(GridOutput output)
Bridge