/** * Creates an and matcher combining this matcher and the given one * @param matcher The matcher to be put in and with this one * @return A matcher that return true if this matcher and the passed one return true */ @SuppressWarnings("unchecked") public final LambdaJMatcher<T> and(Matcher<T> matcher) { return AndMatcher.and(this, matcher); }
/** * Creates an and matcher combining all the passed matchers * @param matchers The matchers to be put in and * @return A matcher that return true if all the matchers return true */ @Factory public static <T> AndMatcher<T> and(Matcher<T>... matchers) { return new AndMatcher<T>(matchers); } }