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 virtdata-lib-curves4 Show documentation
Show all versions of virtdata-lib-curves4 Show documentation
Statistical sampling library for use in virtualdataset libraries, based on apache commons math 4
/* Copyright (c) 2000-2010 hamcrest.org
*/
package org.hamcrest.core;
import static org.hamcrest.core.IsNot.not;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.Factory;
import org.hamcrest.BaseMatcher;
/**
* 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())
*
*/
@Factory
public static Matcher