Class IsCloseTo

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

public class IsCloseTo extends Object implements Constraint
Is the value a number equal to a value within some range of acceptable error?
  • Constructor Details

    • IsCloseTo

      public IsCloseTo(double value, double error)
  • 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