com.g2forge.gearbox.functional.runner.IProcess Maven / Gradle / Ivy
The newest version!
package com.g2forge.gearbox.functional.runner;
import java.io.InputStream;
import java.io.OutputStream;
import com.g2forge.alexandria.java.close.ICloseable;
public interface IProcess extends ICloseable, IStandardIO {
public int getExitCode();
public default boolean isSuccess() {
return getExitCode() == 0;
}
public default void assertSuccess() {
if (!isSuccess()) throw new RuntimeException();
}
}