Class Shell.Result

java.lang.Object
org.terracotta.utilities.exec.Shell.Result
All Implemented Interfaces:
Iterable<String>
Enclosing class:
Shell

public static final class Shell.Result extends Object implements Iterable<String>
The Shell.execute(Charset, String...) command execution result.
  • Field Details

    • commandLines

      private final List<String> commandLines
    • exitCode

      private final int exitCode
  • Constructor Details

    • Result

      private Result(int exitCode, List<String> commandLines)
  • Method Details

    • exitCode

      public int exitCode()
      Gets the process exit code.
      Returns:
      the process exit code
    • lines

      public List<String> lines()
      Gets the list holding the captured stdout/stderr lines.
      Returns:
      an unmodifiable list of the captured output lines
    • iterator

      public Iterator<String> iterator()
      Gets an iterator over the captured stdout/stderr lines.
      Specified by:
      iterator in interface Iterable<String>
      Returns:
      a new Iterator over the stdout/stderr lines