org.eclipse.swtbot.swt.finder.matchers
Class AnyOf<T>

java.lang.Object
  extended by org.hamcrest.BaseMatcher<T>
      extended by org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher<T>
          extended by org.eclipse.swtbot.swt.finder.matchers.AnyOf<T>
All Implemented Interfaces:
Matcher<T>, SelfDescribing

public class AnyOf<T>
extends AbstractMatcher<T>

A matcher that evaluates to true if any the matchers evaluate to true.

Version:
$Id$
Author:
Ketan Padegaonkar <KetanPadegaonkar [at] gmail [dot] com>

Field Summary
 
Fields inherited from class org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher
log
 
Method Summary
static
<T extends Widget>
Matcher<T>
anyOf(Iterable<Matcher<? extends T>> matchers)
          Evaluates to true only if ANY of the passed in matchers evaluate to true.
static
<T extends Widget>
Matcher<T>
anyOf(Matcher<? extends T>... matchers)
          Evaluates to true only if ANY of the passed in matchers evaluate to true.
 void describeTo(Description description)
           
protected  boolean doMatch(Object o)
          Subclasses must override, this is the actual method that does the matching
 
Methods inherited from class org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher
matches
 
Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

doMatch

protected boolean doMatch(Object o)
Description copied from class: AbstractMatcher
Subclasses must override, this is the actual method that does the matching

Specified by:
doMatch in class AbstractMatcher<T>
Parameters:
o - the item to match.
Returns:
true if the item matches, false otherwise.

describeTo

public void describeTo(Description description)

anyOf

public static <T extends Widget> Matcher<T> anyOf(Matcher<? extends T>... matchers)
Evaluates to true only if ANY of the passed in matchers evaluate to true.

Returns:
a matcher.

anyOf

public static <T extends Widget> Matcher<T> anyOf(Iterable<Matcher<? extends T>> matchers)
Evaluates to true only if ANY of the passed in matchers evaluate to true.

Returns:
a matcher.