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.
-
-
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 java.lang.StringDELIMITERDelimiter string betweendescriptions.(package private) java.util.Collection<Description>descriptionsprivate static java.lang.StringLINE_SEPARATOR(package private) java.lang.Stringprefix(package private) java.lang.Stringsuffix
-
Constructor Summary
Constructors Constructor Description JoinDescription(java.lang.String prefix, java.lang.String suffix, java.util.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(java.lang.Object o)inthashCode()java.lang.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 java.lang.String LINE_SEPARATOR
-
DELIMITER
private static final java.lang.String DELIMITER
Delimiter string betweendescriptions.
-
descriptions
final java.util.Collection<Description> descriptions
-
prefix
final java.lang.String prefix
-
suffix
final java.lang.String suffix
-
-
Constructor Detail
-
JoinDescription
public JoinDescription(java.lang.String prefix, java.lang.String suffix, java.util.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:
java.lang.NullPointerException- if the given prefix isnull.java.lang.NullPointerException- if the given suffix isnull.java.lang.NullPointerException- if the given descriptions containsnullelements or descriptions itself isnull.
-
-
Method Detail
-
checkNotNull
private static Description checkNotNull(Description description)
-
value
public java.lang.String value()
- Specified by:
valuein classDescription- Returns:
- the value of this description.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
appendIndentedValueTo
private JoinDescription.IndentedAppendable appendIndentedValueTo(JoinDescription.IndentedAppendable indentableBuilder)
-
-