edu.gwu.simplenetsim
Class Debug

java.lang.Object
  extended by edu.gwu.simplenetsim.Debug

public class Debug
extends java.lang.Object

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

debug

public static boolean debug
This variable determines whether or not debug output is written to the file. It is set by the GUI.

Constructor Detail

Debug

public Debug()
Method Detail

setOutputFile

public static void setOutputFile(boolean useFile,
                                 java.lang.String dirName,
                                 java.lang.String fileName)

isSet

public static boolean isSet()

print

public static void print(java.lang.String str)
Equivalent to System.out.print()

Parameters:
str - a String value

println

public static void println(java.lang.String str)
Equivalent to System.out.println()

Parameters:
str - a String value

print

public static void print(java.lang.Object obj)

println

public static void println(java.lang.Object obj)

error

public static void error(java.lang.String str)

close

public static void close()

getPrintWriter

public static java.io.PrintWriter getPrintWriter()