Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

edu.ucsb.ccs.jaqual.standard
Class InstanceOf  view InstanceOf download InstanceOf.java

java.lang.Object
  extended byedu.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 $

Field Summary
protected  java.lang.Class targetClass
          The class to match instances of.
 
Constructor Summary
InstanceOf(java.lang.Class clazz)
          Create a new assertion.
 
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
 

Field Detail

targetClass

protected java.lang.Class targetClass
The class to match instances of.

Constructor Detail

InstanceOf

public InstanceOf(java.lang.Class clazz)
Create a new assertion.

Method Detail

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