1 package org.hamcrest; 2 3 /** 4 * BaseClass for all Matcher implementations. 5 * 6 * @see Matcher 7 */ 8 public abstract class BaseMatcher<T> implements Matcher<T> { 9 10 /** 11 * @see Matcher#_dont_implement_Matcher___instead_extend_BaseMatcher_() 12 */ 13 @Override 14 @Deprecated _dont_implement_Matcher___instead_extend_BaseMatcher_()15 public final void _dont_implement_Matcher___instead_extend_BaseMatcher_() { 16 // See Matcher interface for an explanation of this method. 17 } 18 19 @Override describeMismatch(Object item, Description description)20 public void describeMismatch(Object item, Description description) { 21 description.appendText("was ").appendValue(item); 22 } 23 24 @Override toString()25 public String toString() { 26 return StringDescription.toString(this); 27 } 28 } 29