public class Equals extends Object implements ArgumentMatcher<Object>, ContainsExtraTypeInfo, Serializable
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Object |
getWanted() |
int |
hashCode() |
boolean |
matches(Object actual)
Informs if this matcher accepts the given argument.
|
String |
toString() |
String |
toStringWithType(String className) |
boolean |
typeMatches(Object target)
Checks if target target has matching type.
|
public Equals(Object wanted)
public boolean matches(Object actual)
ArgumentMatcherThe method should never assert if the argument doesn't match. It should only return false.
See the example in the top level javadoc for ArgumentMatcher
matches in interface ArgumentMatcher<Object>actual - the argumentpublic final Object getWanted()
getWanted in interface ContainsExtraTypeInfopublic String toStringWithType(String className)
toStringWithType in interface ContainsExtraTypeInfoclassName - - name of the class to be printed in description
Returns more verbose description of the object which include type informationpublic boolean typeMatches(Object target)
ContainsExtraTypeInfoContainsExtraTypeInfo.toStringWithType(String)typeMatches in interface ContainsExtraTypeInfoCopyright © 2025. All rights reserved.