Package org.assertj.core.description
Class JoinDescription.IndentedAppendable
- java.lang.Object
-
- org.assertj.core.description.JoinDescription.IndentedAppendable
-
- All Implemented Interfaces:
java.lang.Appendable
- Enclosing class:
- JoinDescription
private static class JoinDescription.IndentedAppendable extends java.lang.Object implements java.lang.Appendable
The wrapper forStringBuilder
aware of indentation.
-
-
Field Summary
Fields Modifier and Type Field Description private int
currentIndentation
private java.lang.StringBuilder
stringBuilder
-
Constructor Summary
Constructors Constructor Description IndentedAppendable(java.lang.StringBuilder stringBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JoinDescription.IndentedAppendable
append(char c)
JoinDescription.IndentedAppendable
append(java.lang.CharSequence charSequence)
JoinDescription.IndentedAppendable
append(java.lang.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()
java.lang.String
toString()
-
-
-
Method Detail
-
append
public JoinDescription.IndentedAppendable append(java.lang.CharSequence charSequence)
- Specified by:
append
in interfacejava.lang.Appendable
-
append
public JoinDescription.IndentedAppendable append(java.lang.CharSequence charSequence, int start, int end)
- Specified by:
append
in interfacejava.lang.Appendable
-
append
public JoinDescription.IndentedAppendable append(char c)
- Specified by:
append
in interfacejava.lang.Appendable
-
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.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-