org.hamcrest.core.IsNull Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hamcrest Show documentation
Show all versions of hamcrest Show documentation
Core API and libraries of hamcrest matcher framework.
package org.hamcrest.core;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import static org.hamcrest.core.IsNot.not;
/**
* Is the value null?
*/
public class IsNull extends BaseMatcher {
@Override
public boolean matches(Object o) {
return o == null;
}
@Override
public void describeTo(Description description) {
description.appendText("null");
}
/**
* Creates a matcher that matches if examined object is null
.
* For example:
* assertThat(cheese, is(nullValue())
*
*/
public static Matcher
© 2015 - 2024 Weber Informatics LLC | Privacy Policy