Class Debug


  • public class Debug
    extends Object
    Version:
    1.0
    Author:
    Lewis Dunstall Brighton University
    • Constructor Detail

      • Debug

        public Debug()
    • Method Detail

      • set

        public static boolean set​(boolean state)
        Set true/false to print debugging information
        Parameters:
        state - Debugging true false
        Returns:
        The old state
      • trace

        public static void trace​(String fmt,
                                 Object... params)
        Display text for debugging purposes
        Parameters:
        fmt - The same as printf etc
        params - The parameters to fmt
      • assertTrue

        public static void assertTrue​(boolean ok,
                                      String fmt,
                                      Object... params)
        Display a fatal message if the assertion fails
        Parameters:
        ok - true if all is ok
        fmt - The same as printf etc
        params - The parameters to fmt
      • error

        public static void error​(String fmt,
                                 Object... params)
        Display a fatal message
        Parameters:
        fmt - The same as printf etc
        params - The parameters to fmt