java.lang.Object edu.gwu.simplenetsim.Debug
public class Debug
Use the class Debug
to help create debugging output
in the file "debug.dat". You can call Debug.println()
from anywhere in the code. If debugging is turned on (in the GUI),
then your stuff gets into the file "debug.dat".
Field Summary | |
---|---|
static boolean |
debug
This variable determines whether or not debug output is written to the file. |
Constructor Summary | |
---|---|
Debug()
|
Method Summary | |
---|---|
static void |
close()
|
static void |
error(java.lang.String str)
|
static java.io.PrintWriter |
getPrintWriter()
|
static boolean |
isSet()
|
static void |
print(java.lang.Object obj)
|
static void |
print(java.lang.String str)
Equivalent to System.out.print() |
static void |
println(java.lang.Object obj)
|
static void |
println(java.lang.String str)
Equivalent to System.out.println() |
static void |
setOutputFile(boolean useFile,
java.lang.String dirName,
java.lang.String fileName)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean debug
Constructor Detail |
---|
public Debug()
Method Detail |
---|
public static void setOutputFile(boolean useFile, java.lang.String dirName, java.lang.String fileName)
public static boolean isSet()
public static void print(java.lang.String str)
System.out.print()
str
- a String
valuepublic static void println(java.lang.String str)
System.out.println()
str
- a String
valuepublic static void print(java.lang.Object obj)
public static void println(java.lang.Object obj)
public static void error(java.lang.String str)
public static void close()
public static java.io.PrintWriter getPrintWriter()