Module xyz.ronella.casual.trivial
Package xyz.ronella.trivial.handy.impl
Class CommandArray.CommandArrayBuilder
java.lang.Object
xyz.ronella.trivial.handy.impl.CommandArray.CommandArrayBuilder
- Enclosing class:
- CommandArray
The only instance that can create CommandArray.
-
Method Summary
Modifier and TypeMethodDescriptionAccepts the arguments of the command.addArg(BooleanSupplier when, String arg) Accepts the arguments of the command.addArgs(Collection<String> args) Accepts the arguments of the command.addArgs(BooleanSupplier when, Collection<String> args) Accepts the arguments of the command.Accepts an argument of the program itself.addPArg(BooleanSupplier when, String arg) Accepts an argument of the program itself.addPArgs(Collection<String> args) Accepts the arguments of the program itself.addPArgs(BooleanSupplier when, Collection<String> args) Accepts the arguments of the program itself.Accepts an argument that must be at the end of the command arguments.addZArg(BooleanSupplier when, String arg) Accepts an argument that must be at the end of the command arguments.addZArgs(Collection<String> args) Accepts the arguments that must be at the end of the command arguments.addZArgs(BooleanSupplier when, Collection<String> args) Accepts the arguments that must be at the end of the command arguments.build()The method that can create an instance of CommandArray.setCommand(String command) Accepts the command to be run with the program.setProgram(String program) Accepts the program name to be executed.
-
Method Details
-
build
The method that can create an instance of CommandArray.- Returns:
- An instance of CommandArray.
-
setProgram
Accepts the program name to be executed.- Parameters:
program- The name of the program.- Returns:
- An instance of CommandArrayBuilder
-
setCommand
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
-