Код: Выделить всё
public class StatementRegister {
public static final Map> registry = new HashMap();
public static Supplier register(Class return_type, Supplier constructor, BiFunction code) {
Supplier registry_value = () -> statement.get().withID(id);
registry.put(id,new StatementType(return_type,statement));
return registry_value;
}
public record StatementType(Class return_type, Supplier constructor, BiFunction code) {}
}
Подробнее здесь: https://stackoverflow.com/questions/795 ... o-supplier