11ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabotpackage org.hamcrest; 21ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot 31ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot/** 41ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot * A description of a Matcher. A Matcher will describe itself to a description 51ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot * which can later be used for reporting. 61ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot * 71ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot * @see Matcher#describeTo(Description) 81ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot */ 91ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabotpublic interface Description { 101ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot 111ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot /** 121ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot * Appends some plain text to the description. 131ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot */ 141ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot Description appendText(String text); 151ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot 161ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot /** 171ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot * Appends the description of a {@link SelfDescribing} value to this description. 181ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot */ 191ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot Description appendDescriptionOf(SelfDescribing value); 201ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot 211ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot /** 221ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot * Appends an arbitary value to the description. 231ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot */ 241ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot Description appendValue(Object value); 251ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot 261ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot /** 271ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot * Appends a list of values to the description. 281ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot */ 291ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot <T> Description appendValueList(String start, String separator, String end, 301ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot T... values); 311ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot 321ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot /** 331ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot * Appends a list of values to the description. 341ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot */ 351ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot <T> Description appendValueList(String start, String separator, String end, 361ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot Iterable<T> values); 371ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot 381ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot /** 391ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot * Appends a list of {@link org.hamcrest.SelfDescribing} objects 401ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot * to the description. 411ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot */ 421ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot Description appendList(String start, String separator, String end, 431ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot Iterable<? extends SelfDescribing> values); 441ecfda91236a8970119144e59e0ba6113dc22c0fBrett Chabot} 45