public class Equals extends ArgumentMatcher<java.lang.Object> implements ContainsExtraTypeInformation, java.io.Serializable
| Constructor and Description |
|---|
Equals(java.lang.Object wanted) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
describe(java.lang.Object object) |
void |
describeTo(org.hamcrest.Description description)
By default this method decamelizes matchers name to promote meaningful names for matchers.
|
boolean |
equals(java.lang.Object o) |
protected java.lang.Object |
getWanted() |
int |
hashCode() |
boolean |
matches(java.lang.Object actual)
Returns whether this matcher accepts the given argument.
|
boolean |
typeMatches(java.lang.Object object) |
org.hamcrest.SelfDescribing |
withExtraTypeInfo() |
public boolean matches(java.lang.Object actual)
ArgumentMatcherThe method should never assert if the argument doesn't match. It should only return false.
matches in interface org.hamcrest.Matcher<java.lang.Object>matches in class ArgumentMatcher<java.lang.Object>actual - the argumentpublic void describeTo(org.hamcrest.Description description)
ArgumentMatcherFor example StringWithStrongLanguage matcher will generate 'String with strong language' description in case of failure.
You might want to override this method to provide more specific description of the matcher (useful when verification failures are reported).
describeTo in interface org.hamcrest.SelfDescribingdescribeTo in class ArgumentMatcher<java.lang.Object>description - the description to which the matcher description is
appended.public java.lang.String describe(java.lang.Object object)
protected final java.lang.Object getWanted()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic org.hamcrest.SelfDescribing withExtraTypeInfo()
withExtraTypeInfo in interface ContainsExtraTypeInformationpublic boolean typeMatches(java.lang.Object object)
typeMatches in interface ContainsExtraTypeInformation