jmarkov

## Class DebugReporter

- java.lang.Object
- - jmarkov.DebugReporter

-     public class DebugReporter
      extends java.lang.Object

  A debug reporter is used to report debug Information from a program. It has an internal integer number, called the Debuglevel, where 0 means no debug information will be reporter and 5 a lot of verbose information will be reported. The information is reported to standard output, to a PrintWriter (which can be associated with a file), or to a TextPanel which can be included in a graphic user interface.
  Author:
    Germán Riaño. Universidad de los Andes.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DebugReporter(int initDebugLevel)` Creates a debug reporter that will report to standard I/O.
    `DebugReporter(java.io.PrintWriter dbgWt)` Creates a debug reporter that will send its output to the given PrintWriter.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `debug(int level, java.lang.String s)` Reports this debug information.
    `void` | `debug(int level, java.lang.String s, boolean newline)` Reports this debug information.
    `void` | `debug(int level, java.lang.String s, boolean newline, boolean indent)` Reports this debug information.
    `int` | `getCurLevel()`
    `int` | `getDebugLevel()`
    `void` | `setCurLevel(int curLevel)` Sets the debug level, where level=0 means no debug info, level = 5 verbose info.
    `void` | `setDebugLevel(int level)` Sets the debug level, where level=0 means no debug info, level = 5 verbose info.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DebugReporter

          public DebugReporter(int initDebugLevel)

      Creates a debug reporter that will report to standard I/O.
      Parameters:
        `initDebugLevel` - Initial debug level

    - #### DebugReporter

          public DebugReporter(java.io.PrintWriter dbgWt)

      Creates a debug reporter that will send its output to the given PrintWriter.
      Parameters:
        `dbgWt` - the PrintWriter where the debug information will be sent.

  - ### Method Detail

    - #### setCurLevel

          public final void setCurLevel(int curLevel)

      Sets the debug level, where level=0 means no debug info, level = 5 verbose info.
      Parameters:
        `curLevel` - The curLevel to set to.

    - #### getCurLevel

          public final int getCurLevel()

      Returns:
        Returns the curLevel.

    - #### debug

          public void debug(int level,
                   java.lang.String s)

      Reports this debug information. Newline and indent are true.
      Parameters:
        `level` - Use level=0 for very important things, level=5 less important.
        `s` - The String to report
      See Also:
        `debug(int, String, boolean, boolean)`

    - #### debug

          public void debug(int level,
                   java.lang.String s,
                   boolean newline)

      Reports this debug information. Info is indented if newline is selected.
      Parameters:
        `level` - Use level=0 for very important things, level=5 less important.
        `s` - The String to report
        `newline` - whether newline is added at the end.
      See Also:
        `debug(int, String, boolean, boolean)`

    - #### debug

          public void debug(int level,
                   java.lang.String s,
                   boolean newline,
                   boolean indent)

      Reports this debug information.
      Parameters:
        `level` - Use level=0 for very important things, level=5 less important.
        `s` - The String to report
        `newline` - whether newline is added at the end.
        `indent` - whwether information should go indented according to debug level.

    - #### getDebugLevel

          public int getDebugLevel()

      Returns:
        current debug level, where level=0 means no debug info and level = 5 verbose info.

    - #### setDebugLevel

          public void setDebugLevel(int level)

      Sets the debug level, where level=0 means no debug info, level = 5 verbose info.
      Parameters:
        `level` - debug level