2015-09-07 11:44:36 -06:00
|
|
|
|
// com/mindviewinc/util/Print.java
|
2015-06-15 17:47:35 -07:00
|
|
|
|
// <20>2015 MindView LLC: see Copyright.txt
|
|
|
|
|
// Print methods that can be used without
|
|
|
|
|
// qualifiers, using static imports:
|
|
|
|
|
package com.mindviewinc.util;
|
|
|
|
|
import java.io.*;
|
|
|
|
|
|
|
|
|
|
public class Print {
|
|
|
|
|
// Print with a newline:
|
|
|
|
|
public static void print(Object obj) {
|
|
|
|
|
System.out.println(obj);
|
|
|
|
|
}
|
|
|
|
|
// Print a newline by itself:
|
|
|
|
|
public static void print() {
|
|
|
|
|
System.out.println();
|
|
|
|
|
}
|
|
|
|
|
// Print with no line break:
|
|
|
|
|
public static void printnb(Object obj) {
|
|
|
|
|
System.out.print(obj);
|
|
|
|
|
}
|
|
|
|
|
// The Java 5 printf() (from C):
|
|
|
|
|
public static PrintStream
|
|
|
|
|
printf(String format, Object... args) {
|
|
|
|
|
return System.out.printf(format, args);
|
|
|
|
|
}
|
2015-09-07 11:44:36 -06:00
|
|
|
|
}
|