class SecurityAnalysisResultComparisonWriter implements AutoCloseable {

    public SecurityAnalysisResultComparisonWriter write(Boolean computationOk1, Boolean computationOk2, boolean equivalent) {
        checkInput(computationOk1, computationOk2);
        try {
            formatter = contingency == null ? formatter.writeEmptyCell() : formatter.writeCell(contingency);
            formatter = computationOk1 == null ? formatter.writeEmptyCells(1) : formatter.writeCell(getStatus(computationOk1));
            formatter = computationOk2 == null ? formatter.writeEmptyCells(1) : formatter.writeCell(getStatus(computationOk2));
            formatter.writeEmptyCells(11);
            formatter.writeCell(getComparison(equivalent));
        } catch (IOException e) {
            LOGGER.error("Error writing security analysis results computation status comparison: {}", e.getMessage());
        }
        return this;
    }

    public  SecurityAnalysisResultComparisonWriter(Writer writer);

}