Addeded support for collections are arguments

This commit is contained in:
Erik C. Thauvin 2023-08-28 14:36:12 -07:00
parent a2f62e1b1b
commit c32682dafc

View file

@ -48,6 +48,8 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
* <li>{@code command("cmd", "/c", "stop.bat")}</li> * <li>{@code command("cmd", "/c", "stop.bat")}</li>
* <li>{@code command("./stop.sh"}</li> * <li>{@code command("./stop.sh"}</li>
* </ul></p> * </ul></p>
*
* @see #command(Collection)
*/ */
public ExecOperation command(String... arg) { public ExecOperation command(String... arg) {
args_.addAll(List.of(arg)); args_.addAll(List.of(arg));
@ -59,7 +61,7 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
* *
* @see #command(String...) * @see #command(String...)
*/ */
public ExecOperation command(List<String> args) { public ExecOperation command(Collection<String> args) {
args_.addAll(args); args_.addAll(args);
return this; return this;
} }