org.hamcrest
Class BaseDescription

java.lang.Object
  extended by org.hamcrest.BaseDescription
All Implemented Interfaces:
Description
Direct Known Subclasses:
StringDescription

public abstract class BaseDescription
extends Object
implements Description

A Description 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
BaseDescription()
           
 
Method Summary
protected abstract  void append(char c)
          Append the char c to the description.
protected  void append(String str)
          Append the String str to the description.
 Description appendDescriptionOf(SelfDescribing value)
          Appends the description of a SelfDescribing value to this description.
 Description appendList(String start, String separator, String end, Iterable<? extends SelfDescribing> values)
          Appends a list of SelfDescribing objects to the description.
 Description appendText(String text)
          Appends some plain text to the description.
 Description appendValue(Object value)
          Appends an arbitary value to the description.
<T> Description
appendValueList(String start, String separator, String end, Iterable<T> values)
          Appends a list of values to the description.
<T> Description
appendValueList(String start, String separator, String end, T... values)
          Appends a list of values to the description.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseDescription

public BaseDescription()
Method Detail

appendText

public Description appendText(String text)
Description copied from interface: Description
Appends some plain text to the description.

Specified by:
appendText in interface Description

appendDescriptionOf

public Description appendDescriptionOf(SelfDescribing value)
Description copied from interface: Description
Appends the description of a SelfDescribing value to this description.

Specified by:
appendDescriptionOf in interface Description

appendValue

public Description appendValue(Object value)
Description copied from interface: Description
Appends an arbitary value to the description.

Specified by:
appendValue in interface Description

appendValueList

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

Specified by:
appendValueList in interface Description

appendValueList

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

Specified by:
appendValueList in interface Description

appendList

public Description appendList(String start,
                              String separator,
                              String end,
                              Iterable<? extends SelfDescribing> values)
Description copied from interface: Description
Appends a list of SelfDescribing objects to the description.

Specified by:
appendList in interface Description

append

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.


append

protected abstract void append(char c)
Append the char c to the description.



Copyright © 2002–2014 JUnit. All rights reserved.