com.mockobjects.constraint

Class IsSame

Implemented Interfaces:
Constraint

public class IsSame
extends java.lang.Object
implements Constraint

Is the value the same object as another value?

Constructor Summary

IsSame(Object o)
Creates a new instance of IsSame

Method Summary

boolean
eval(Object arg)
Evaluates the constraint for argument o.
String
toString()

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)
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()

Copyright © 2002 Mock Objects. All Rights Reserved.