Package org.olap4j.impl
Class Spacer
java.lang.Object
org.olap4j.impl.Spacer
Efficiently writes strings of spaces.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd
(int n) Increases the current number of spaces byn
.int
get()
Returns the current number of spaces.set
(int n) Sets the current number of spaces.spaces
(PrintWriter buf) Appends current number of spaces to aPrintWriter
.spaces
(StringWriter buf) Appends current number of spaces to aStringWriter
.Appends current number of spaces to aWriter
.spaces
(StringBuilder buf) Appends current number of spaces to aStringBuilder
.subtract
(int n) Reduces the current number of spaces byn
.toString()
Returns a string of the current number of spaces.
-
Constructor Details
-
Spacer
public Spacer()Creates a Spacer with zero spaces. -
Spacer
public Spacer(int n) Creates a Spacer with a given number of spaces.
-
-
Method Details
-
set
Sets the current number of spaces. -
get
public int get()Returns the current number of spaces. -
add
Increases the current number of spaces byn
. -
subtract
Reduces the current number of spaces byn
. -
toString
Returns a string of the current number of spaces. -
spaces
Appends current number of spaces to aStringBuilder
. -
spaces
Appends current number of spaces to aWriter
.- Throws:
IOException
-
spaces
Appends current number of spaces to aStringWriter
. -
spaces
Appends current number of spaces to aPrintWriter
.
-