Package org.hamcrest
Interface Description
-
- All Known Implementing Classes:
BaseDescription,Description.NullDescription,StringDescription
public interface DescriptionA description of a Matcher. A Matcher will describe itself to a description which can later be used for reporting.- See Also:
SelfDescribing.describeTo(Description)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classDescription.NullDescription
-
Field Summary
Fields Modifier and Type Field Description static DescriptionNONEA description that consumes input but does nothing.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DescriptionappendDescriptionOf(SelfDescribing value)Appends the description of aSelfDescribingvalue to this description.DescriptionappendList(java.lang.String start, java.lang.String separator, java.lang.String end, java.lang.Iterable<? extends SelfDescribing> values)Appends a list ofSelfDescribingobjects to the description.DescriptionappendText(java.lang.String text)Appends some plain text to the description.DescriptionappendValue(java.lang.Object value)Appends an arbitrary value to the description.<T> DescriptionappendValueList(java.lang.String start, java.lang.String separator, java.lang.String end, java.lang.Iterable<T> values)Appends a list of values to the description.<T> DescriptionappendValueList(java.lang.String start, java.lang.String separator, java.lang.String end, T... values)Appends a list of values to the description.
-
-
-
Field Detail
-
NONE
static final Description NONE
A description that consumes input but does nothing.
-
-
Method Detail
-
appendText
Description appendText(java.lang.String text)
Appends some plain text to the description.- Parameters:
text- the text to append.- Returns:
- the update description when displaying the matcher error.
-
appendDescriptionOf
Description appendDescriptionOf(SelfDescribing value)
Appends the description of aSelfDescribingvalue to this description.- Parameters:
value- the value to append.- Returns:
- the update description when displaying the matcher error.
-
appendValue
Description appendValue(java.lang.Object value)
Appends an arbitrary value to the description.- Parameters:
value- the object to append.- Returns:
- the update description when displaying the matcher error.
-
appendValueList
<T> Description appendValueList(java.lang.String start, java.lang.String separator, java.lang.String end, T... values)
Appends a list of values to the description.- Type Parameters:
T- the description type.- Parameters:
start- the prefix.separator- the separator.end- the suffix.values- the values to append.- Returns:
- the update description when displaying the matcher error.
-
appendValueList
<T> Description appendValueList(java.lang.String start, java.lang.String separator, java.lang.String end, java.lang.Iterable<T> values)
Appends a list of values to the description.- Type Parameters:
T- the description type.- Parameters:
start- the prefix.separator- the separator.end- the suffix.values- the values to append.- Returns:
- the update description when displaying the matcher error.
-
appendList
Description appendList(java.lang.String start, java.lang.String separator, java.lang.String end, java.lang.Iterable<? extends SelfDescribing> values)
Appends a list ofSelfDescribingobjects to the description.- Parameters:
start- the prefix.separator- the separator.end- the suffix.values- the values to append.- Returns:
- the update description when displaying the matcher error.
-
-