Add generator method for filter objects.