Class IsInstanceOf

java.lang.Object
com.mockobjects.constraint.IsInstanceOf
All Implemented Interfaces:
Constraint

public class IsInstanceOf extends Object implements Constraint
Tests whether the value is an instance of a class.
  • Constructor Details

    • IsInstanceOf

      public IsInstanceOf(Class theclass)
      Creates a new instance of IsInstanceOf
      Parameters:
      theclass - The predicate evaluates to true for instances of this class or one of its subclasses.
  • Method Details

    • eval

      public boolean eval(Object arg)
      Description copied from interface: Constraint
      Evaluates the constraint for argument o.
      Specified by:
      eval in interface Constraint
      Returns:
      true if o meets the constraint, false if it does not.
    • toString

      public String toString()
      Overrides:
      toString in class Object