@@ -0,0 +1,1720 @@
+/*%0A * #%25L%0A * wcm.io%0A * %25%25%0A * Copyright (C) 2020 wcm.io%0A * %25%25%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A * #L%25%0A */%0Apackage io.wcm.qa.glnm.hamcrest;%0A%0Aimport org.hamcrest.Description;%0Aimport org.hamcrest.Matcher;%0Aimport org.hamcrest.TypeSafeMatcher;%0A%0A%0A/**%0A * %3Cp%3EAbstract TypeSafeWrappingMatcher class.%3C/p%3E%0A *%0A * @since 5.0.0%0A */%0Apublic abstract class TypeSafeWrappingMatcher%3CT, I%3E extends TypeSafeMatcher%3CT%3E %7B%0A%0A  private Matcher%3CI%3E internalMatcher;%0A%0A  protected TypeSafeWrappingMatcher(Matcher%3CI%3E matcher) %7B%0A    setInternalMatcher(matcher);%0A  %7D%0A%0A  /** %7B@inheritDoc%7D */%0A  @Override%0A  public void describeTo(Description description) %7B%0A    getInternalMatcher().describeTo(description);%0A  %7D%0A%0A  @Override%0A  protected void describeMismatchSafely(T item, Description mismatchDescription) %7B%0A    getInternalMatcher().describeMismatch(map(item), mismatchDescription);%0A  %7D%0A%0A  protected Matcher%3CI%3E getInternalMatcher() %7B%0A    return internalMatcher;%0A  %7D%0A%0A  protected abstract I map(T item);%0A%0A  @Override%0A  protected boolean matchesSafely(T item) %7B%0A    return getInternalMatcher().matches(map(item));%0A  %7D%0A%0A  protected void setInternalMatcher(Matcher%3CI%3E internalMatcher) %7B%0A    this.internalMatcher = internalMatcher;%0A  %7D%0A%0A%7D%0A

add wrapping matcher base class