fix java 6 compilation error with generic predicates