Top Description Constructors Methods
org.hamcrest

public abstract Class BaseDescription

extends Object
implements Description
Class Inheritance
All Implemented Interfaces
org.hamcrest.Description
Known Direct Subclasses
org.hamcrest.StringDescription
Imports
org.hamcrest.internal.ArrayIterator, .SelfDescribingValueIterator, java.util.Arrays, .Iterator

A Description that is stored as a string.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
append(String str)

Append the String str to the description.

protected abstract void
append(char c)

Append the char c to the description.

public Description
appendDescriptionOf(SelfDescribing value)

Implements org.hamcrest.Description.appendDescriptionOf.

Appends the description of a SelfDescribing value to this description.
public Description
appendList(String start, String separator, String end, Iterable<? extends SelfDescribing> values)

Implements org.hamcrest.Description.appendList.

Appends a list of org.hamcrest.SelfDescribing objects to the description.
private Description
appendList(String start, String separator, String end, Iterator<? extends SelfDescribing> i)

public Description
appendText(String text)

Implements org.hamcrest.Description.appendText.

Appends some plain text to the description.
public Description
appendValue(Object value)

Implements org.hamcrest.Description.appendValue.

Appends an arbitrary value to the description.
public final <T> Description
appendValueList(String start, String separator, String end, T... values)

Implements org.hamcrest.Description.appendValueList.

Appends a list of values to the description.
public <T> Description
appendValueList(String start, String separator, String end, Iterable<T> values)

Implements org.hamcrest.Description.appendValueList.

Appends a list of values to the description.
private <T> Description
appendValueList(String start, String separator, String end, Iterator<T> values)

private String
private void
toJavaSyntax(String unformatted)

private void
toJavaSyntax(char ch)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BaseDescriptionback to summary
public BaseDescription()

Method Detail

appendback to summary
protected void append(String str)

Append the String str to the description. The default implementation passes every character to append(char). Override in subclasses to provide an efficient implementation.

appendback to summary
protected abstract void append(char c)

Append the char c to the description.

appendDescriptionOfback to summary
public Description appendDescriptionOf(SelfDescribing value)

Implements org.hamcrest.Description.appendDescriptionOf.

Doc from org.hamcrest.Description.appendDescriptionOf.

Appends the description of a SelfDescribing value to this description.

Annotations
@Override
appendListback to summary
public Description appendList(String start, String separator, String end, Iterable<? extends SelfDescribing> values)

Implements org.hamcrest.Description.appendList.

Doc from org.hamcrest.Description.appendList.

Appends a list of org.hamcrest.SelfDescribing objects to the description.

Annotations
@Override
appendListback to summary
private Description appendList(String start, String separator, String end, Iterator<? extends SelfDescribing> i)
appendTextback to summary
public Description appendText(String text)

Implements org.hamcrest.Description.appendText.

Doc from org.hamcrest.Description.appendText.

Appends some plain text to the description.

Annotations
@Override
appendValueback to summary
public Description appendValue(Object value)

Implements org.hamcrest.Description.appendValue.

Doc from org.hamcrest.Description.appendValue.

Appends an arbitrary value to the description.

Annotations
@Override
appendValueListback to summary
public final <T> Description appendValueList(String start, String separator, String end, T... values)

Implements org.hamcrest.Description.appendValueList.

Doc from org.hamcrest.Description.appendValueList.

Appends a list of values to the description.

Annotations
@SafeVarargs
@Override
appendValueListback to summary
public <T> Description appendValueList(String start, String separator, String end, Iterable<T> values)

Implements org.hamcrest.Description.appendValueList.

Doc from org.hamcrest.Description.appendValueList.

Appends a list of values to the description.

Annotations
@Override
appendValueListback to summary
private <T> Description appendValueList(String start, String separator, String end, Iterator<T> values)
descriptionOfback to summary
private String descriptionOf(Object value)
toJavaSyntaxback to summary
private void toJavaSyntax(String unformatted)
toJavaSyntaxback to summary
private void toJavaSyntax(char ch)