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
TheDescriptioncombining multipleDescriptions. 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 classJoinDescription.IndentedAppendableThe wrapper forStringBuilderaware of indentation.
-
Field Summary
Fields Modifier and Type Field Description private static intDEFAULT_INDENTATIONprivate static StringDELIMITERDelimiter string betweendescriptions.(package private) Collection<Description>descriptionsprivate static StringLINE_SEPARATOR(package private) Stringprefix(package private) Stringsuffix
-
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.IndentedAppendableappendIndentedValueTo(JoinDescription.IndentedAppendable indentableBuilder)private static DescriptioncheckNotNull(Description description)booleanequals(Object o)inthashCode()Stringvalue()-
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 containsnullelements or descriptions itself isnull.
-
-
Method Detail
-
checkNotNull
private static Description checkNotNull(Description description)
-
value
public String value()
- Specified by:
valuein classDescription- Returns:
- the value of this description.
-
appendIndentedValueTo
private JoinDescription.IndentedAppendable appendIndentedValueTo(JoinDescription.IndentedAppendable indentableBuilder)
-
-