📄 generateoutput.java
字号:
/*
Copyright 2006 Christian Gross http://www.devspace.com
From the book Ajax Patterns and Best Practices
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/*
* GenerateOutput.java
*
* Created on February 9, 2006, 10:28 PM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package devspace.testDrivenDevelopment.tracer;
import devspace.ajax.logging.*;
/**
*
* @author cgross
*/
public class GenerateOutput {
/** Creates a new instance of GenerateOutput */
public GenerateOutput() {
}
public static void write( String identifier, int[][] var) {
Logging.debug( "(int[][] " + identifier + "\n (Length (" + var.length + ")\n");
for( int[] numbers : var) {
Logging.debug( " Element (Length " + numbers.length + ") (Numbers ");
for( int value : numbers) {
Logging.debug( "(" + value + ")");
}
Logging.debug( "))\n");
}
Logging.debug( " ))\n");
}
public static void write( String identifier, int[] var) {
Logging.debug( "(int[] " + identifier + "\n (Length (" + var.length + ") Numbers (");
for( int value : var) {
Logging.debug( "(" + value + ")");
}
Logging.debug( "))\n");
}
public static void write( String identifier, double[] var) {
Logging.debug( "(double[] " + identifier + "\n (Length (" + var.length + ") Numbers (");
for( double value : var) {
Logging.debug( "(" + value + ")");
}
Logging.debug( "))\n");
}
public static void write( String identifier, boolean[] var) {
Logging.debug( "(int[] " + identifier + "\n (Length (" + var.length + ") Numbers (");
for( boolean value : var) {
if( value) {
Logging.debug( "(true)");
} else {
Logging.debug( "(false)");
}
}
Logging.debug( "))\n");
}
public static void write( String identifier, Iterable list) {
Logging.debug( "(Type" + list.getClass().getName() + " " + identifier + "(\n");
for( Object obj : list) {
Logging.debug( "(" + obj.toString() + ")");
}
Logging.debug( "))\n");
}
public static void write( String identifier, Object obj) {
Logging.debug( "(Type" + obj.getClass().getName() + " " + identifier + "(\n"
+ obj.toString() + "))\n");
}
public static void Write( String identifier, String value) {
Logging.debug( "(String " + identifier + " (" + value + "))\n");
}
public static void Write( String identifier, double value) {
Logging.debug( "(double " + identifier + " (" + value + "))\n");
}
public static void Write( String identifier, int value) {
Logging.debug( "(int " + identifier + " (" + value + "))\n");
}
public static void Write( String identifier, long value ) {
Logging.debug( "(ulong " + identifier + " (" + value + "))\n" );
}
public static void WriteSingle( String identifier, double[] var) {
String buffer = "(double[] " + identifier + "\n (Length (" + var.length + ") Numbers (";
for( double value : var) {
buffer += "(" + value + ")";
}
buffer += "))\n";
Logging.debug( buffer);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -