public class Indenter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
indentLength |
Modifier and Type | Method and Description |
---|---|
Indenter |
decreaseIndent(int decrease)
Decreases indentation length.
|
java.lang.String |
getIndentString()
Creates indent string based on current indent size.
|
Indenter |
increaseIndent(int increase)
Increases indentation length.
|
int |
indent()
Returns current indentation length.
|
Indenter |
setIndent(int indentLength)
Increases indentation length.
|
public int indent()
public Indenter setIndent(int indentLength)
indentLength
- new indent lengthjava.lang.IllegalArgumentException
- if indentLength is negative.public Indenter increaseIndent(int increase)
increase
- length to increase by.java.lang.IllegalArgumentException
- if increase is negative.public Indenter decreaseIndent(int decrease)
decrease
- length to decrease byjava.lang.IllegalArgumentException
- if decrease is negative, or if decrease is greater than
current indentation length
.public java.lang.String getIndentString()