void (final Stream<Object> objectStream, Validator validator) { Stream<Set<List<Object>>> rStream = objectStream.map(validator ::validate); Stream<Set<List<Object>>> lStream = objectStream.map((a) -> validator.validate(a)); }