JUNIT1.4源文件等等 源文件等等 源文件等等 源文件

源代码在线查看: isnull.java

软件大小: 795 K
上传用户: xufengping716
关键词: JUNIT 1.4
下载地址: 免注册下载 普通下载 VIP

相关代码

				/*  Copyright (c) 2000-2006 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 {				    public boolean matches(Object o) {				        return o == null;				    }								    public void describeTo(Description description) {				        description.appendText("null");				    }								    /**				     * Matches if value is null.				     */				    @Factory				    public static  Matcher nullValue() {				        return new IsNull();				    }								    /**				     * Matches if value is not null.				     */				    @Factory				    public static  Matcher notNullValue() {				        return not(IsNull.nullValue());				    }								    /**				     * Matches if value is null. With type inference.				     */				    @Factory				    public static  Matcher nullValue(@SuppressWarnings("unused") Class type) {				        return nullValue();				    }								    /**				     * Matches if value is not null. With type inference.				     */				    @Factory				    public static  Matcher notNullValue(@SuppressWarnings("unused") Class type) {				        return notNullValue();				    }				}											

相关资源