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:
- org.hamcrest.Matcher<T>, org.hamcrest.SelfDescribing
public class WithItem<T extends Item>
- extends AbstractMatcher<T>
- Version:
- $Id$
- Author:
- Ketan Patel (Bug 259860)
|
Method Summary |
void |
describeTo(org.hamcrest.Description description)
|
protected boolean |
doMatch(Object obj)
Subclasses must override, this is the actual method that does the matching |
Object |
get(int index)
|
ArrayList<T> |
getAllMatches()
|
static
|
withItem(org.hamcrest.Matcher<?> matcher)
Returns a matcher that matches objects containing an item that matches the matcher. |
| Methods inherited from class org.hamcrest.BaseMatcher |
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString |
describeTo
public void describeTo(org.hamcrest.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 Object get(int index)
withItem
public static <T extends Item> WithItem<T> withItem(org.hamcrest.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.