org.eclipse.swtbot.swt.finder.matchers
Class WithItem<T extends Item>
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher<T>
org.eclipse.swtbot.swt.finder.matchers.WithItem<T>
- All Implemented Interfaces:
- Matcher<T>, SelfDescribing
public class WithItem<T extends Item>
- extends AbstractMatcher<T>
- Version:
- $Id$
- Author:
- Ketan Patel (Bug 259860)
describeTo
public void describeTo(Description description)
doMatch
protected boolean doMatch(Object obj)
- Description copied from class:
AbstractMatcher
- Subclasses must override, this is the actual method that does the matching
- Specified by:
doMatch
in class AbstractMatcher<T extends Item>
- Parameters:
obj
- the item to match.
- Returns:
true
if the item matches, false
otherwise.
getAllMatches
public ArrayList<T> getAllMatches()
get
public T get(int index)
withItem
public static <T extends Item> WithItem<T> withItem(Matcher<?> matcher)
- Returns a matcher that matches objects containing an item that matches the matcher.
Note: This invokes getItems method on the object and expects to see an array as a return value.
- Parameters:
matcher
- the matcher.
- Returns:
- a matcher.