Class CommandArray.CommandArrayBuilder

java.lang.Object
xyz.ronella.trivial.handy.impl.CommandArray.CommandArrayBuilder
Enclosing class:
CommandArray

public static final class CommandArray.CommandArrayBuilder extends Object
The only instance that can create CommandArray.
  • Method Details

    • build

      public CommandArray build()
      The method that can create an instance of CommandArray.
      Returns:
      An instance of CommandArray.
    • setProgram

      public CommandArray.CommandArrayBuilder setProgram(String program)
      Accepts the program name to be executed.
      Parameters:
      program - The name of the program.
      Returns:
      An instance of CommandArrayBuilder
    • setCommand

      public CommandArray.CommandArrayBuilder setCommand(String command)
      Accepts the command to be run with the program.
      Parameters:
      command - The name of the command.
      Returns:
      An instance of CommandArrayBuilder
    • addPArgs

      Accepts the arguments of the program itself.
      Parameters:
      args - The argument of the command.
      Returns:
      An instance of CommandArrayBuilder
    • addPArgs

      Accepts the arguments of the program itself.
      Parameters:
      when - Only apply the method when this returns true.
      args - The argument of the command.
      Returns:
      An instance of CommandArrayBuilder
    • addPArg

      Accepts an argument of the program itself.
      Parameters:
      arg - The argument of the command.
      Returns:
      An instance of CommandArrayBuilder
    • addPArg

      Accepts an argument of the program itself.
      Parameters:
      when - Only apply the method when this returns true.
      arg - The argument of the command.
      Returns:
      An instance of CommandArrayBuilder
    • addArgs

      Accepts the arguments of the command.
      Parameters:
      args - The argument of the command.
      Returns:
      An instance of CommandArrayBuilder
    • addArgs

      Accepts the arguments of the command.
      Parameters:
      when - Only apply the method when this returns true.
      args - The argument of the command.
      Returns:
      An instance of CommandArrayBuilder
    • addArg

      Accepts the arguments of the command.
      Parameters:
      arg - The argument of the command.
      Returns:
      An instance of CommandArrayBuilder
    • addArg

      Accepts the arguments of the command.
      Parameters:
      when - Only apply the method when this returns true.
      arg - The argument of the command.
      Returns:
      An instance of CommandArrayBuilder
    • addZArgs

      Accepts the arguments that must be at the end of the command arguments.
      Parameters:
      args - The last arguments of the command.
      Returns:
      An instance of CommandArrayBuilder
    • addZArgs

      Accepts the arguments that must be at the end of the command arguments.
      Parameters:
      when - Only apply the method when this returns true.
      args - The last arguments of the command.
      Returns:
      An instance of CommandArrayBuilder
    • addZArg

      Accepts an argument that must be at the end of the command arguments.
      Parameters:
      arg - The last arguments of the command.
      Returns:
      An instance of CommandArrayBuilder
    • addZArg

      Accepts an argument that must be at the end of the command arguments.
      Parameters:
      when - Only apply the method when this returns true.
      arg - The last arguments of the command.
      Returns:
      An instance of CommandArrayBuilder