Package org.assertj.core.description
Class JoinDescription.IndentedAppendable
- java.lang.Object
-
- org.assertj.core.description.JoinDescription.IndentedAppendable
-
- All Implemented Interfaces:
Appendable
- Enclosing class:
- JoinDescription
private static class JoinDescription.IndentedAppendable extends Object implements Appendable
The wrapper forStringBuilder
aware of indentation.
-
-
Field Summary
Fields Modifier and Type Field Description private int
currentIndentation
private StringBuilder
stringBuilder
-
Constructor Summary
Constructors Constructor Description IndentedAppendable(StringBuilder stringBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JoinDescription.IndentedAppendable
append(char c)
JoinDescription.IndentedAppendable
append(CharSequence charSequence)
JoinDescription.IndentedAppendable
append(CharSequence charSequence, int start, int end)
(package private) JoinDescription.IndentedAppendable
changeIndentationBy(int indentation)
Adjusts the indentation size byindentation
.(package private) JoinDescription.IndentedAppendable
indent()
Appends the indentation according to current size.(package private) JoinDescription.IndentedAppendable
indentBy(int indentation)
Shortcut method fromchangeIndentationBy(int)
andindent()
String
toString()
-
-
-
Field Detail
-
stringBuilder
private final StringBuilder stringBuilder
-
currentIndentation
private int currentIndentation
-
-
Constructor Detail
-
IndentedAppendable
IndentedAppendable(StringBuilder stringBuilder)
-
-
Method Detail
-
append
public JoinDescription.IndentedAppendable append(CharSequence charSequence)
- Specified by:
append
in interfaceAppendable
-
append
public JoinDescription.IndentedAppendable append(CharSequence charSequence, int start, int end)
- Specified by:
append
in interfaceAppendable
-
append
public JoinDescription.IndentedAppendable append(char c)
- Specified by:
append
in interfaceAppendable
-
changeIndentationBy
JoinDescription.IndentedAppendable changeIndentationBy(int indentation)
Adjusts the indentation size byindentation
.- Parameters:
indentation
- The indentation adjustment.- Returns:
- a this instance.
-
indent
JoinDescription.IndentedAppendable indent()
Appends the indentation according to current size.- Returns:
- a this instance.
-
indentBy
JoinDescription.IndentedAppendable indentBy(int indentation)
Shortcut method fromchangeIndentationBy(int)
andindent()
- Parameters:
indentation
- The indentation adjustment.- Returns:
- a this instance.
-
-