Package org.terracotta.utilities.exec
Class Shell.Result
- java.lang.Object
-
- org.terracotta.utilities.exec.Shell.Result
-
- All Implemented Interfaces:
java.lang.Iterable<java.lang.String>
- Enclosing class:
- Shell
public static final class Shell.Result extends java.lang.Object implements java.lang.Iterable<java.lang.String>TheShell.execute(Charset, String...)command execution result.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.String>commandLinesprivate intexitCode
-
Constructor Summary
Constructors Modifier Constructor Description privateResult(int exitCode, java.util.List<java.lang.String> commandLines)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intexitCode()Gets the process exit code.java.util.Iterator<java.lang.String>iterator()Gets an iterator over the captured stdout/stderr lines.java.util.List<java.lang.String>lines()Gets the list holding the captured stdout/stderr lines.
-
-
-
Method Detail
-
exitCode
public int exitCode()
Gets the process exit code.- Returns:
- the process exit code
-
lines
public java.util.List<java.lang.String> lines()
Gets the list holding the captured stdout/stderr lines.- Returns:
- an unmodifiable list of the captured output lines
-
iterator
public java.util.Iterator<java.lang.String> iterator()
Gets an iterator over the captured stdout/stderr lines.- Specified by:
iteratorin interfacejava.lang.Iterable<java.lang.String>- Returns:
- a new
Iteratorover the stdout/stderr lines
-
-