java.lang.Object
org.variantsync.studies.evolution.simulation.shell.ShellCommand
Direct Known Subclasses:
CpCommand, DiffCommand, EchoCommand, PatchCommand, RmCommand

public abstract class ShellCommand extends Object
Base class for various shell commands.
  • Constructor Details

    • ShellCommand

      public ShellCommand()
  • Method Details

    • parts

      public abstract String[] parts()
      Return the String parts that define and configure the command execution (e.g., ["echo", "Hello World"])
      Returns:
      the parts of the shell command.
    • interpretResult

      public org.variantsync.functjonal.Result<List<String>,ShellException> interpretResult(int resultCode, List<String> output)
      Interpret the result code returned from a shell command
      Parameters:
      resultCode - the code that is to be parsed
      Returns:
      the result
    • toString

      public String toString()
      Overrides:
      toString in class Object