org.eclipse.swtbot.swt.finder.matchers
Class WithId<T extends Widget>
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher<T>
org.eclipse.swtbot.swt.finder.matchers.WithId<T>
- All Implemented Interfaces:
- org.hamcrest.Matcher<T>, org.hamcrest.SelfDescribing
public class WithId<T extends Widget>
- extends AbstractMatcher<T>
Tells if a particular widget has value for the given key.
- Since:
- 2.0
- Version:
- $Id$
- Author:
- Ketan Padegaonkar <KetanPadegaonkar [at] gmail [dot] com>
|
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 |
static
<T extends Widget>
org.hamcrest.Matcher<T> |
|
withId(String value)
Matches a widget that has the specified value set for the key
SWTBotPreferences.DEFAULT_KEY. |
static
<T extends Widget>
org.hamcrest.Matcher<T> |
|
withId(String key,
String value)
Matches a widget that has the specified Key/Value pair set as data into it. |
| Methods inherited from class org.hamcrest.BaseMatcher |
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString |
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 Widget>
- Parameters:
obj - the item to match.
- Returns:
true if the item matches, false otherwise.
describeTo
public void describeTo(org.hamcrest.Description description)
withId
public static <T extends Widget> org.hamcrest.Matcher<T> withId(String key,
String value)
- Matches a widget that has the specified Key/Value pair set as data into it.
- Parameters:
key - the keyvalue - the value
- Returns:
- a matcher.
- See Also:
Widget.setData(String, Object)
withId
public static <T extends Widget> org.hamcrest.Matcher<T> withId(String value)
- Matches a widget that has the specified value set for the key
SWTBotPreferences.DEFAULT_KEY.
- Parameters:
value - the value
- Returns:
- a matcher.
- Since:
- 2.0
- See Also:
Widget.setData(String, Object)