KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jmock > core > constraint > IsNull


1 /* Copyright (c) 2000-2004 jMock.org
2  */

3 package org.jmock.core.constraint;
4
5 import org.jmock.core.Constraint;
6
7
8 /**
9  * Is the value null?
10  */

11 public class IsNull implements Constraint
12 {
13     public boolean eval( Object JavaDoc o ) {
14         return o == null;
15     }
16
17     public StringBuffer JavaDoc describeTo( StringBuffer JavaDoc buffer ) {
18         return buffer.append("null");
19     }
20 }
21
22
Popular Tags