@SuppressWarnings("unchecked") @Test public void supportsMixedTypes() { final Matcher<SampleSubClass> matcher = anyOf( equalTo(new SampleBaseClass("bad")), equalTo(new SampleBaseClass("good")), equalTo(new SampleSubClass("ugly"))); assertMatches("didn't pass middle sub-matcher", matcher, new SampleSubClass("good")); }
@SafeVarargs public AnyOf(Matcher<? super T> ... matchers) { this(Arrays.asList(matchers)); }
AnyOf extends ShortcutCombination<T> { @SafeVarargs public AnyOf(Matcher<? super T> ... matchers) { this(Arrays.asList(matchers)); } }
AnyOf extends ShortcutCombination<T> { @SafeVarargs public AnyOf(Matcher<? super T> ... matchers) { this(Arrays.asList(matchers)); } @SafeVarargs  AnyOf(Matcher<? super T> ... matchers);  AnyOf(Iterable<Matcher<? super T>> matchers); }
AnyOf extends ShortcutCombination<T> { @SafeVarargs public AnyOf(Matcher<? super T> ... matchers) { this(Arrays.asList(matchers)); } @SafeVarargs  AnyOf(Matcher<? super T> ... matchers);  AnyOf(Iterable<Matcher<? super T>> matchers); @Override boolean matches(Object o); @Override void describeTo(Description description); static AnyOf<T> anyOf(Iterable<Matcher<? super T>> matchers); @SafeVarargs static AnyOf<T> anyOf(Matcher<? super T>... matchers); }
AnyOf extends ShortcutCombination<T> { @SafeVarargs public AnyOf(Matcher<? super T> ... matchers) { this(Arrays.asList(matchers)); } @SafeVarargs  AnyOf(Matcher<? super T> ... matchers);  AnyOf(Iterable<Matcher<? super T>> matchers); @Override boolean matches(Object o); @Override void describeTo(Description description); static AnyOf<T> anyOf(Iterable<Matcher<? super T>> matchers); @SafeVarargs static AnyOf<T> anyOf(Matcher<? super T>... matchers);  }