@Factory @SuppressWarnings("unchecked") public static Matcher<String> nonEmptyStringOrNull() { return CoreMatchers.anyOf(nullValue(String.class), nonEmptyString()); }
/** * Evaluates to true if ANY of the passed in matchers evaluate to true. * * @param matchers the matchers */ @SafeVarargs public final void anyOf(Matcher<? super T>... matchers) { verifyUsingMatcher(CoreMatchers.anyOf(matchers)); }