build a scala wrapper for BiPredicate