Class IsSame

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

public class IsSame extends Object implements Constraint
Is the value the same object as another value?
  • Constructor Details

    • IsSame

      public IsSame(Object o)
      Creates a new instance of IsSame
      Parameters:
      o - The predicate evaluates to true only when the argument is this object.
  • 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