printf utils
This commit is contained in:
parent
02c7235d4d
commit
fcc3854803
|
@ -61,6 +61,14 @@ public abstract class SigarCommandBase
|
||||||
return this.formatter;
|
return this.formatter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String sprintf(String format, Object[] items) {
|
||||||
|
return new PrintfFormat(format).sprintf(items);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void printf(String format, Object[] items) {
|
||||||
|
println(sprintf(format, items));
|
||||||
|
}
|
||||||
|
|
||||||
public void printf(Object[] items) {
|
public void printf(Object[] items) {
|
||||||
println(getFormatter().sprintf(items));
|
println(getFormatter().sprintf(items));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue