Package org.assertj.core.description
Class JoinDescription
- java.lang.Object
-
- org.assertj.core.description.Description
-
- org.assertj.core.description.JoinDescription
-
public class JoinDescription extends Description
TheDescription
combining multipleDescription
s. It'll honor the nested descriptions and will indent them as appropriate.- Author:
- Edgar Asatryan, Joel Costigliola
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
JoinDescription.IndentedAppendable
The wrapper forStringBuilder
aware of indentation.
-
Field Summary
Fields Modifier and Type Field Description private static int
DEFAULT_INDENTATION
private static String
DELIMITER
Delimiter string betweendescriptions
.(package private) Collection<Description>
descriptions
private static String
LINE_SEPARATOR
(package private) String
prefix
(package private) String
suffix
-
Constructor Summary
Constructors Constructor Description JoinDescription(String prefix, String suffix, Collection<Description> descriptions)
Creates a new
.JoinDescription
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private JoinDescription.IndentedAppendable
appendIndentedValueTo(JoinDescription.IndentedAppendable indentableBuilder)
private static Description
checkNotNull(Description description)
boolean
equals(Object o)
int
hashCode()
String
value()
-
Methods inherited from class org.assertj.core.description.Description
emptyIfNull, mostRelevantDescription, toString
-
-
-
-
Field Detail
-
DEFAULT_INDENTATION
private static final int DEFAULT_INDENTATION
- See Also:
- Constant Field Values
-
LINE_SEPARATOR
private static final String LINE_SEPARATOR
-
DELIMITER
private static final String DELIMITER
Delimiter string betweendescriptions
.
-
descriptions
final Collection<Description> descriptions
-
prefix
final String prefix
-
suffix
final String suffix
-
-
Constructor Detail
-
JoinDescription
public JoinDescription(String prefix, String suffix, Collection<Description> descriptions)
Creates a new
.JoinDescription
- Parameters:
prefix
- The beginning part of this description.suffix
- The ending part of this description.descriptions
- The descriptions to combine.- Throws:
NullPointerException
- if the given prefix isnull
.NullPointerException
- if the given suffix isnull
.NullPointerException
- if the given descriptions containsnull
elements or descriptions itself isnull
.
-
-
Method Detail
-
checkNotNull
private static Description checkNotNull(Description description)
-
value
public String value()
- Specified by:
value
in classDescription
- Returns:
- the value of this description.
-
appendIndentedValueTo
private JoinDescription.IndentedAppendable appendIndentedValueTo(JoinDescription.IndentedAppendable indentableBuilder)
-
-