void (String className, Map<EKey, Equations> map) { PuritySolver solver = new PuritySolver(); for (Map.Entry<EKey, Equations> entry : map.entrySet()) { EKey key = entry.getKey(); Equations equations = entry.getValue(); for (DirectionResultPair drp : equations.results) { Result result = drp.result; if (result instanceof Effects effects) { key = new EKey(key.member, fromInt(drp.directionKey), equations.stable, false); solver.addEquation(key, effects); } } } solver.addPlainFieldEquations(md -> md instanceof Member member && member.internalClassName.equals(className)); solver.solve(); map.replaceAll((key, eqs) -> updatePurity(key, eqs, solver)); }