|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Matcher<T>
A matcher over acceptable values. A matcher is able to describe itself to give feedback when it fails.
Matcher implementations should NOT directly implement this interface. Instead, extend theBaseMatcher
abstract class,
which will ensure that the Matcher API can grow to support
new features and remain compatible with all Matcher implementations.
For easy access to common Matcher implementations, use the static factory
methods in CoreMatchers
.
CoreMatchers
,
BaseMatcher
Method Summary | |
---|---|
void |
_dont_implement_Matcher___instead_extend_BaseMatcher_()
This method simply acts a friendly reminder not to implement Matcher directly and instead extend BaseMatcher. |
boolean |
matches(Object item)
Evaluates the matcher for argument item. |
Methods inherited from interface org.hamcrest.SelfDescribing |
---|
describeTo |
Method Detail |
---|
boolean matches(Object item)
item
- the object against which the matcher is evaluated.
true
if item matches, otherwise false
.BaseMatcher
void _dont_implement_Matcher___instead_extend_BaseMatcher_()
for reasons why.
,
BaseMatcher
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |