?? debugging.java
字號(hào):
/*** This code was written by Kent Paul Dolan. See accompanying file** TravellerDoc.html for status for your use.*/package com.well.www.user.xanthian.java.tools;import java.util.*;import com.coyotegulch.tools.*;public class Debugging{/*** Provide a pause facility, so that visual debugging stuff can be** studied before it is replaced. Mostly this is a wrapper to** accomplish the required try/catch mechanism.*/ public static void snooze( long howLong ) { { try { Thread.sleep( howLong ); } catch (Exception e) {} } }/*** Provide debugging aids, which stringify an array into a** pretty format to use in a debugging dump.*/ public static String dump(boolean a[]) { StringBuffer b = new StringBuffer(""); b.append("["); for ( int i = 0; i < a.length; i++ ) { b.append( ( ( i == 0 ) ? "" : "," ) + ( a[i] ? "t" : "f" ) ); } b.append("]"); return b.toString(); } public static String dump(int a[]) { StringBuffer b = new StringBuffer(""); b.append("["); for ( int i = 0; i < a.length; i++ ) { b.append( ( ( i == 0 ) ? "" : "," ) + String.valueOf( a[i] ) ); } b.append("]"); return b.toString(); } public static String dump(double a[]) { StringBuffer b = new StringBuffer(""); b.append("["); for ( int i = 0; i < a.length; i++ ) { b.append( ( ( i == 0 ) ? "" : "," ) + String.valueOf( a[i] ) ); } b.append("]"); return b.toString(); } public static String dump(int a[][]) { StringBuffer b = new StringBuffer(""); b.append("["); for ( int i = 0; i < a.length; i++ ) { if ( a[i] != null ) { b.append( ( ( i == 0 ) ? "" : "," ) ); b.append("("); for ( int j = 0; j < a[i].length; j++ ) { b.append( ( ( j == 0 ) ? "" : "," ) + String.valueOf( a[i][j] ) ); } b.append(")"); } } b.append("]"); return b.toString(); } public static String dump(double a[][]) { StringBuffer b = new StringBuffer(""); b.append("["); for ( int i = 0; i < a.length; i++ ) { b.append( ( ( i == 0 ) ? "" : "," ) ); b.append("("); for ( int j = 0; j < a[i].length; j++ ) { b.append( ( ( j == 0 ) ? "" : "," ) + String.valueOf( a[i][j] ) ); } b.append(")"); } b.append("]"); return b.toString(); } public static String dump( Vector v ) { StringBuffer b = new StringBuffer(""); b.append("["); for ( int i = 0; i < v.size(); i++ ) { if ( v.elementAt(i) == null ) { b.append( ( ( i == 0 ) ? "" : "," ) + "(null)" ); } else { b.append( ( ( i == 0 ) ? "" : "," ) + v.elementAt(i).toString() ); } } b.append("]"); return b.toString(); } public static String dump( Object o[] ) { StringBuffer b = new StringBuffer(""); b.append("["); for ( int i = 0; i < o.length; i++ ) { if ( o[i] == null ) { b.append( ( ( i == 0 ) ? "" : "," ) + "(null)" ); } else { b.append( ( ( i == 0 ) ? "" : "," ) + o[i].toString() ); } } b.append("]"); return b.toString(); }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -