Redefined (again) EventPredicate, using a class with a state variable rather than binding