Package com.mockobjects.constraint
Class IsEventFrom
java.lang.Object
com.mockobjects.constraint.IsEventFrom
- All Implemented Interfaces:
Constraint
Tests if the value is an event announced by a specific object.
-
Constructor Summary
ConstructorsConstructorDescriptionIsEventFrom
(Class event_class, Object source) Constructs an IsEventFrom predicate that returns true for any object derived from event_class announced by source.IsEventFrom
(Object source) Constructs an IsEventFrom predicate that returns true for any object derived fromEventObject
announced by source. -
Method Summary
-
Constructor Details
-
IsEventFrom
Constructs an IsEventFrom predicate that returns true for any object derived fromEventObject
announced by source. -
IsEventFrom
Constructs an IsEventFrom predicate that returns true for any object derived from event_class announced by source.
-
-
Method Details
-
eval
Description copied from interface:Constraint
Evaluates the constraint for argument o.- Specified by:
eval
in interfaceConstraint
- Returns:
true
if o meets the constraint,false
if it does not.
-
toString
-