    001    /*  Copyright (c) 2000-2006 hamcrest.org
    002     */
    003    package org.hamcrest;
    004
    005    /**
    006     * BaseClass for all Matcher implementations.
    007     *
    008     * @see Matcher
    009     */
    010    public abstract class BaseMatcher<T> implements Matcher<T> {
    011
    012        /**
    013         * @see Matcher#_dont_implement_Matcher___instead_extend_BaseMatcher_()
    014         */
    015        @Override
    016        @Deprecated
    017        public final void _dont_implement_Matcher___instead_extend_BaseMatcher_() {
    018            // See Matcher interface for an explanation of this method.
    019        }
    020
    021        @Override
    022        public void describeMismatch(Object item, Description description) {
    023            description.appendText("was ").appendValue(item);
    024        }
    025
    026        @Override
    027        public String toString() {
    028            return StringDescription.toString(this);
    029        }
    030    }