public class InvisibleIndentation extends Object implements Indentation
InvisibleIndentation is an Indentation that has no visible
effect.DEFAULT, INVISIBLE| Constructor and Description |
|---|
InvisibleIndentation()
|
InvisibleIndentation(LineBreak lineBreak)
Creates a new
InvisibleIndentation. |
| Modifier and Type | Method and Description |
|---|---|
void |
appendTo(Appendable appendable,
int level)
Appends the string that needs to be appended at the beginning of a line,
with the result that the the line is indented by the given level, to the
given
Appendable |
void |
appendTo(Appendable appendable,
int level,
boolean includeLineBreak)
Appends the string that needs to be appended at the beginning of a line,
with the result that the the line is indented by the given level or the
string that needs to be appended at the end of a line, with the result
that the next line is indented by the given level, including the
necessary line break characters, to the given
Appendable. |
String |
get(int level)
Returns the string that needs to be appended at the beginning of a line,
with the result that the the line is indented by the given level.
|
String |
get(int level,
boolean includeLineBreak)
Returns the string that needs to be appended at the beginning of a line,
with the result that the the line is indented by the given level or the
string that needs to be appended at the end of a line, with the result
that the next line is indented by the given level, including the
necessary line break characters.
|
String |
getLineBreak()
returns the line break string used by this
Indentation. |
boolean |
isVisible()
Returns whether this
Indentation has any visible effect or if
every indentation string is the empty
string. |
public InvisibleIndentation()
public InvisibleIndentation(LineBreak lineBreak) throws IllegalArgumentException
InvisibleIndentation.lineBreak - The LineBreak to be used.IllegalArgumentException - If the given LineBreak is null.public boolean isVisible()
IndentationIndentation has any visible effect or if
every indentation string is the empty
string.isVisible in interface IndentationIndentation has any visible effect.public String getLineBreak()
IndentationIndentation.getLineBreak in interface IndentationIndentation.public String get(int level) throws IllegalArgumentException
Indentation
The result is never null, even if this Indentation is
not visible.
get in interface Indentationlevel - The indentation level.IllegalArgumentException - If the given level is negative.public String get(int level, boolean includeLineBreak) throws IllegalArgumentException
Indentation
The line break characters are omitted, if this Indentation is not
visible.
The result is never null, even if this Indentation is
not visible.
get in interface Indentationlevel - The indentation level.includeLineBreak - Whether to include the line break characters.IllegalArgumentException - If the given level is negative.public void appendTo(Appendable appendable, int level) throws IllegalArgumentException, IOException
IndentationAppendableappendTo in interface Indentationappendable - The Appendable to be used.level - The indentation level.IllegalArgumentException - If the given Appendable is null or if the
given level is negative.IOException - If appending to the given Appendable failed.public void appendTo(Appendable appendable, int level, boolean includeLineBreak) throws IllegalArgumentException, IOException
IndentationAppendable.
The line break characters are omitted, if this Indentation is not
visible.
appendTo in interface Indentationappendable - The Appendable to be used.level - The indentation level.includeLineBreak - Whether to include the line break characters.IllegalArgumentException - If the given Appendable is null or if the
given level is negative.IOException - If appending to the given Appendable failed.Copyright © 2016 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.