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 forStringBuilderaware of indentation.
-
-
Field Summary
Fields Modifier and Type Field Description private intcurrentIndentationprivate StringBuilderstringBuilder
-
Constructor Summary
Constructors Constructor Description IndentedAppendable(StringBuilder stringBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JoinDescription.IndentedAppendableappend(char c)JoinDescription.IndentedAppendableappend(CharSequence charSequence)JoinDescription.IndentedAppendableappend(CharSequence charSequence, int start, int end)(package private) JoinDescription.IndentedAppendablechangeIndentationBy(int indentation)Adjusts the indentation size byindentation.(package private) JoinDescription.IndentedAppendableindent()Appends the indentation according to current size.(package private) JoinDescription.IndentedAppendableindentBy(int indentation)Shortcut method fromchangeIndentationBy(int)andindent()StringtoString()
-
-
-
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:
appendin interfaceAppendable
-
append
public JoinDescription.IndentedAppendable append(CharSequence charSequence, int start, int end)
- Specified by:
appendin interfaceAppendable
-
append
public JoinDescription.IndentedAppendable append(char c)
- Specified by:
appendin 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.
-
-