    001    package org.hamcrest;
    002
    003    /**
    004     * TODO(ngd): Document.
    005     *
    006     * @param <T>
    007     */
    008    public abstract class DiagnosingMatcher<T> extends BaseMatcher<T> {
    009
    010        @Override
    011        public final boolean matches(Object item) {
    012            return matches(item, Description.NONE);
    013        }
    014
    015        @Override
    016        public final void describeMismatch(Object item, Description mismatchDescription) {
    017            matches(item, mismatchDescription);
    018        }
    019
    020        protected abstract boolean matches(Object item, Description mismatchDescription);
    021    }