|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object avrora.sim.Simulator.Printer
The Simulator.Printer
class is a printer that is tied to a specific Simulator
instance. Being tied to this instance, it will always report the node ID and time before printing
anything. This simple mechanism allows the output to be much cleaner to track the output
of multiple nodes at once.
Field Summary | |
boolean |
enabled
The enabled field is true when this printer is enabled. |
Method Summary | |
void |
println(java.lang.String s)
The println() method prints the node ID, the time, and a message to the
console, synchronizing with other threads so that output is not interleaved. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public boolean enabled
enabled
field is true when this printer is enabled. When this printer
is not enabled, the println()
method SHOULD NOT BE CALLED.
Method Detail |
public void println(java.lang.String s)
println()
method prints the node ID, the time, and a message to the
console, synchronizing with other threads so that output is not interleaved. This method
SHOULD ONLY BE CALLED WHEN enabled
IS TRUE! This is done to prevent
performance bugs created by string construction inside printing (and debugging code).
s
- the string to print
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |