import java.util.Map; public class CompileFail { protected boolean checkRegexCouldBenextToApply(Map, Integer> proposalToRegexPrice) { return proposalToRegexPrice .entrySet() .stream() .allMatch( q -> q.getValue().intValue() == 123 || candidatePriceMatchExpectedPrice(q.getValue().intValue(), (int) q.getKey().get("SomeString"))); } private boolean candidatePriceMatchExpectedPrice(int intValue, int i) { // TODO Auto-generated method stub return false; } }