java.lang.Object
edu.ucsb.ccs.jaqual.standard.InstanceOf
- All Implemented Interfaces:
- edu.ucsb.ccs.jaqual.Assertion
- public class InstanceOf
- extends java.lang.Object
- implements edu.ucsb.ccs.jaqual.Assertion
Assertion to check if an object is an instance of a certain class type.
Example use:
ForAll.in(elements).ensure(new InstanceOf(Integer.class));
- Version:
- $Id: InstanceOf.java,v 1.2 2002/07/11 19:58:33 parkera Exp $
|
Method Summary |
boolean |
eval(java.lang.Object o)
Test an object to see if it is an instance of the target class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
targetClass
protected java.lang.Class targetClass
- The class to match instances of.
InstanceOf
public InstanceOf(java.lang.Class clazz)
- Create a new assertion.
eval
public boolean eval(java.lang.Object o)
- Test an object to see if it is an instance of the target class.
- Specified by:
eval in interface edu.ucsb.ccs.jaqual.Assertion