|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.knowceans.util.Print
public class Print
convenience class to print information. Can also be used to construct strings, then the internal PrintWriter writes to a StringBuilder that can be output as a String object or to stdout (string() method).
Constructor Summary | |
---|---|
Print()
|
Method Summary | |
---|---|
static void |
arrays(java.lang.Object a,
java.lang.Object... b)
checks whether there are arrays in the objects |
static void |
arraysf(java.lang.String format,
java.lang.Object... b)
formats each array element to format. |
static void |
arraysSep(java.lang.String sep,
java.lang.Object... b)
checks whether there are arrays in the objects |
static java.lang.String |
classmethod()
returns a string with class and method position of the current position |
static java.lang.String |
fileline()
returns a string with file and line position of the current location |
static java.io.PrintStream |
getOutput()
get current output stream |
static java.lang.String |
getString()
get the last string that has been written to (if any) |
static void |
main(java.lang.String[] args)
|
static void |
newString()
setup the Print object for a new string output |
static void |
setOutput(java.io.PrintStream s)
sets the output stream for the printer |
static void |
setString(java.lang.StringBuilder sb)
reset output to write to a string buffer |
static void |
setToStderr()
set output to stderr |
static void |
setToStdout()
set output to stdout |
static void |
string()
get the last string that has been written to (if any) |
static void |
strings(java.lang.Object a,
java.lang.Object... b)
prints all objects via tostring methods |
static void |
stringSep(java.lang.String sep,
java.lang.Object... b)
prints all objects via tostring methods, separated by sep |
static void |
whereami()
prints the stack element of the current code location |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Print()
Method Detail |
---|
public static void setOutput(java.io.PrintStream s)
s
- null to disablepublic static void setString(java.lang.StringBuilder sb)
sb
- public static void setToStdout()
public static void setToStderr()
public static void newString()
public static java.io.PrintStream getOutput()
public static void strings(java.lang.Object a, java.lang.Object... b)
a
- b
- public static void stringSep(java.lang.String sep, java.lang.Object... b)
a
- b
- public static void arrays(java.lang.Object a, java.lang.Object... b)
a
- b
- public static void arraysSep(java.lang.String sep, java.lang.Object... b)
a
- b
- public static void arraysf(java.lang.String format, java.lang.Object... b)
a
- b
- public static void whereami()
public static java.lang.String fileline()
public static java.lang.String classmethod()
public static java.lang.String getString()
public static void string()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |