org.hamcrest.core
public class IsSame<T> extends org.hamcrest.BaseMatcher<T>
Modifier and Type | Method and Description |
---|---|
void |
describeTo(org.hamcrest.Description description)
Generates a description of the object.
|
boolean |
matches(java.lang.Object arg)
Evaluates the matcher for argument item.
|
static <T> org.hamcrest.Matcher<T> |
sameInstance(T object)
Creates a new instance of IsSame
|
public IsSame(T object)
public boolean matches(java.lang.Object arg)
org.hamcrest.Matcher
arg
- the object against which the matcher is evaluated.true
if item matches, otherwise false
.BaseMatcher
public void describeTo(org.hamcrest.Description description)
org.hamcrest.SelfDescribing
description
- The description to be built or appended to.public static <T> org.hamcrest.Matcher<T> sameInstance(T object)
object
- The predicate evaluates to true only when the argument is
this object.