1 12 13 14 15 16 package SOFA.SOFAnode.Util.DFSRChecker.parser; 17 18 27 public class Debug { 28 31 public static int debug = 0; 32 33 39 public static void println(String a) { 40 if (debug > 0) 41 System.out.println(a); 42 } 43 44 public static void println(int level, String a) { 45 if (debug >= level) 46 System.out.println(a); 47 } 48 49 53 public static void println() { 54 if (debug > 0) 55 System.out.println(); 56 } 57 58 public static void println(int level) { 59 if (debug >= level) 60 System.out.println(); 61 } 62 63 70 public static void println(int level, int a) { 71 if (debug >= level) 72 System.out.println(a); 73 } 74 75 80 public static void print(String a) { 81 if (debug > 0) 82 System.out.print(a); 83 } 84 85 public static void print(int level, String a) { 86 if (debug >= level) 87 System.out.print(a); 88 } 89 90 98 public static void print(int level, int a) { 99 if (debug >= level) 100 System.out.print(a); 101 } 102 103 109 public static void setLevel(int level) { 110 debug = level; 111 } 112 113 118 public static int getLevel() { 119 return debug; 120 } 121 } | Popular Tags |