org.nukesoft.botutil
Class VerboseConsole

java.lang.Object
  |
  +--org.nukesoft.botutil.VerboseConsole

public class VerboseConsole
extends Object

The VerboseConsole class is used to dynamicaly define the verbosity of all console output. This class can be used as a substitute to System.out.

Author:
Ryan Michela

Field Summary
static int CRITICAL
           
static int HIGH
           
static int LOW
           
static int MEDIUM
           
static int SILENT
           
 
Constructor Summary
VerboseConsole()
           
VerboseConsole(int level)
           
 
Method Summary
static void print(String s)
          Print a string at the default level.
static void print(String s, int level)
          Print a string at a given level.
static void println(String s)
          Print a string at the default level.
static void println(String s, int level)
          Print a string at a given level.
static void setLevel(int level)
          Sets the verbocity level of the console.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SILENT

public static final int SILENT
See Also:
Constant Field Values

LOW

public static final int LOW
See Also:
Constant Field Values

MEDIUM

public static final int MEDIUM
See Also:
Constant Field Values

HIGH

public static final int HIGH
See Also:
Constant Field Values

CRITICAL

public static final int CRITICAL
See Also:
Constant Field Values
Constructor Detail

VerboseConsole

public VerboseConsole()

VerboseConsole

public VerboseConsole(int level)
Method Detail

setLevel

public static void setLevel(int level)
Sets the verbocity level of the console. Only output with a level equal to or higher to the target level will be displayed.

Parameters:
level - The target verbocity level.

print

public static void print(String s,
                         int level)
Print a string at a given level. Equivilent to System.out.print();

Parameters:
s - The string to print.
level - The level of this message.

print

public static void print(String s)
Print a string at the default level. Equivilent to System.out.print();

Parameters:
s - The string to print.

println

public static void println(String s,
                           int level)
Print a string at a given level. Equivilent to System.out.println();

Parameters:
s - The string to print.
level - The level of this message.

println

public static void println(String s)
Print a string at the default level. Equivilent to System.out.println();

Parameters:
s - The string to print.