public class Equals extends java.lang.Object implements ArgumentMatcher<java.lang.Object>, ContainsExtraTypeInfo, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private java.lang.Object |
wanted |
Constructor and Description |
---|
Equals(java.lang.Object wanted) |
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
describe(java.lang.Object object) |
boolean |
equals(java.lang.Object o) |
protected java.lang.Object |
getWanted() |
int |
hashCode() |
boolean |
matches(java.lang.Object actual)
Informs if this matcher accepts the given argument.
|
java.lang.String |
toString() |
java.lang.String |
toStringWithType()
Returns more verbose description of the object which include type information
|
boolean |
typeMatches(java.lang.Object target)
Checks if target target has matching type.
|
public boolean matches(java.lang.Object actual)
ArgumentMatcher
The 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<java.lang.Object>
actual
- the argumentpublic java.lang.String toString()
toString
in class java.lang.Object
private 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.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toStringWithType()
ContainsExtraTypeInfo
toStringWithType
in interface ContainsExtraTypeInfo
public boolean typeMatches(java.lang.Object target)
ContainsExtraTypeInfo
ContainsExtraTypeInfo.toStringWithType()
typeMatches
in interface ContainsExtraTypeInfo