Package org.hamcrest
Class BaseDescription
- java.lang.Object
-
- org.hamcrest.BaseDescription
-
- All Implemented Interfaces:
Description
- Direct Known Subclasses:
StringDescription
public abstract class BaseDescription extends java.lang.Object implements Description
ADescription
that is stored as a string.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hamcrest.Description
Description.NullDescription
-
-
Field Summary
-
Fields inherited from interface org.hamcrest.Description
NONE
-
-
Constructor Summary
Constructors Constructor Description BaseDescription()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
append(char c)
Append the char c to the description.protected void
append(java.lang.String str)
Append the String str to the description.Description
appendDescriptionOf(SelfDescribing value)
Appends the description of aSelfDescribing
value to this description.Description
appendList(java.lang.String start, java.lang.String separator, java.lang.String end, java.lang.Iterable<? extends SelfDescribing> values)
Appends a list ofSelfDescribing
objects to the description.Description
appendText(java.lang.String text)
Appends some plain text to the description.Description
appendValue(java.lang.Object value)
Appends an arbitary value to the description.<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.<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.
-
-
-
Method Detail
-
appendText
public Description appendText(java.lang.String text)
Description copied from interface:Description
Appends some plain text to the description.- Specified by:
appendText
in interfaceDescription
-
appendDescriptionOf
public Description appendDescriptionOf(SelfDescribing value)
Description copied from interface:Description
Appends the description of aSelfDescribing
value to this description.- Specified by:
appendDescriptionOf
in interfaceDescription
-
appendValue
public Description appendValue(java.lang.Object value)
Description copied from interface:Description
Appends an arbitary value to the description.- Specified by:
appendValue
in interfaceDescription
-
appendValueList
public <T> Description appendValueList(java.lang.String start, java.lang.String separator, java.lang.String end, T... values)
Description copied from interface:Description
Appends a list of values to the description.- Specified by:
appendValueList
in interfaceDescription
-
appendValueList
public <T> Description appendValueList(java.lang.String start, java.lang.String separator, java.lang.String end, java.lang.Iterable<T> values)
Description copied from interface:Description
Appends a list of values to the description.- Specified by:
appendValueList
in interfaceDescription
-
appendList
public Description appendList(java.lang.String start, java.lang.String separator, java.lang.String end, java.lang.Iterable<? extends SelfDescribing> values)
Description copied from interface:Description
Appends a list ofSelfDescribing
objects to the description.- Specified by:
appendList
in interfaceDescription
-
append
protected void append(java.lang.String str)
Append the String str to the description. The default implementation passes every character toappend(char)
. Override in subclasses to provide an efficient implementation.
-
append
protected abstract void append(char c)
Append the char c to the description.
-
-