• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package org.hamcrest;
2 
3 /**
4  * A description of a Matcher. A Matcher will describe itself to a description
5  * which can later be used for reporting.
6  *
7  * @see Matcher#describeTo(Description)
8  */
9 public interface Description {
10 
11     /**
12      * Appends some plain text to the description.
13      */
appendText(String text)14     Description appendText(String text);
15 
16     /**
17      * Appends the description of a {@link SelfDescribing} value to this description.
18      */
appendDescriptionOf(SelfDescribing value)19     Description appendDescriptionOf(SelfDescribing value);
20 
21     /**
22      * Appends an arbitary value to the description.
23      */
appendValue(Object value)24     Description appendValue(Object value);
25 
26     /**
27      * Appends a list of values to the description.
28      */
appendValueList(String start, String separator, String end, T... values)29     <T> Description appendValueList(String start, String separator, String end,
30     							    T... values);
31 
32     /**
33      * Appends a list of values to the description.
34      */
appendValueList(String start, String separator, String end, Iterable<T> values)35     <T> Description appendValueList(String start, String separator, String end,
36     							    Iterable<T> values);
37 
38     /**
39      * Appends a list of {@link org.hamcrest.SelfDescribing} objects
40      * to the description.
41      */
appendList(String start, String separator, String end, Iterable<? extends SelfDescribing> values)42     Description appendList(String start, String separator, String end,
43                            Iterable<? extends SelfDescribing> values);
44 }
45