Package org.mockito.internal.matchers
Class Equals
java.lang.Object
org.hamcrest.BaseMatcher<T>
- All Implemented Interfaces:
Serializable
,org.hamcrest.Matcher<Object>
,org.hamcrest.SelfDescribing
,ContainsExtraTypeInformation
- Direct Known Subclasses:
ArrayEquals
public class Equals
extends ArgumentMatcher<Object>
implements ContainsExtraTypeInformation, Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
describeTo
(org.hamcrest.Description description) By default this method decamelizes matchers name to promote meaningful names for matchers.boolean
protected final Object
int
hashCode()
boolean
Returns whether this matcher accepts the given argument.boolean
typeMatches
(Object object) org.hamcrest.SelfDescribing
Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, describeMismatch, isNotNull, toString
-
Constructor Details
-
Equals
-
-
Method Details
-
matches
Description copied from class:ArgumentMatcher
Returns whether this matcher accepts the given argument.The method should never assert if the argument doesn't match. It should only return false.
- Specified by:
matches
in interfaceorg.hamcrest.Matcher<Object>
- Specified by:
matches
in classArgumentMatcher<Object>
- Parameters:
actual
- the argument- Returns:
- whether this matcher accepts the given argument.
-
describeTo
public void describeTo(org.hamcrest.Description description) Description copied from class:ArgumentMatcher
By default this method decamelizes matchers name to promote meaningful names for matchers.For 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).
- Specified by:
describeTo
in interfaceorg.hamcrest.SelfDescribing
- Overrides:
describeTo
in classArgumentMatcher<Object>
- Parameters:
description
- the description to which the matcher description is appended.
-
describe
-
getWanted
-
equals
-
hashCode
public int hashCode() -
withExtraTypeInfo
public org.hamcrest.SelfDescribing withExtraTypeInfo()- Specified by:
withExtraTypeInfo
in interfaceContainsExtraTypeInformation
-
typeMatches
- Specified by:
typeMatches
in interfaceContainsExtraTypeInformation
-