org.jmock.core.constraint

Class IsSame

Implemented Interfaces:
Constraint, SelfDescribing

public class IsSame
extends Object
implements Constraint

Is the value the same object as another value?

Constructor Summary

IsSame(Object object)
Creates a new instance of IsSame

Method Summary

StringBuffer
describeTo(StringBuffer buffer)
boolean
eval(Object arg)
Evaluates the constraint for argument o.

Constructor Details

IsSame

public IsSame(Object object)
Creates a new instance of IsSame
Parameters:
object - The predicate evaluates to true only when the argument is this object.

Method Details

describeTo

public StringBuffer describeTo(StringBuffer buffer)
Specified by:
describeTo in interface SelfDescribing

eval

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