All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.powsybl.openreac.parameters.output.NoThrowAmplOutput Maven / Gradle / Ivy

There is a newer version: 0.8.0
Show newest version
/**
 * Copyright (c) 2023, RTE (http://www.rte-france.com)
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package com.powsybl.openreac.parameters.output;

import com.powsybl.ampl.converter.AmplSubset;
import com.powsybl.ampl.executor.AmplOutputFile;
import com.powsybl.commons.util.StringToIntMapper;

import java.nio.file.Path;

/**
 * Interface for output ampl files, which changes the behavior of errors during file reading.
 * 

* Removes the contract of {@link AmplOutputFile} to throw IOException. * @author Nicolas Pierre */ public interface NoThrowAmplOutput extends AmplOutputFile { /** * On IO errors during this function: *

    *
  • * {@link NoThrowAmplOutput#isErrorState()} must return true. *
  • *
  • * All other methods can have an undefined behavior. *
  • *
*/ @Override void read(Path path, StringToIntMapper stringToIntMapper); /** * @return True if the output reading went bad. WARNING, object might have undefined behavior. */ boolean isErrorState(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy