File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
AndroidExecLibrary/src/main/java/com/excellence/exec Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 44
55import java .io .BufferedReader ;
66import java .io .InputStreamReader ;
7+ import java .util .Arrays ;
78import java .util .List ;
89import java .util .concurrent .Executor ;
910import java .util .concurrent .TimeUnit ;
@@ -70,7 +71,7 @@ public static class Builder {
7071 private long mTimeDelay = 0 ;
7172
7273 /**
73- * 任务命令
74+ * 任务命令:字符串列表形式
7475 *
7576 * @param command
7677 * @return
@@ -80,6 +81,21 @@ public Builder command(List<String> command) {
8081 return this ;
8182 }
8283
84+ /**
85+ * 任务命令:字符串、字符串数组形式
86+ *
87+ * @param command
88+ * @return
89+ */
90+ public Builder command (String [] command ) {
91+ return command (Arrays .asList (command ));
92+ }
93+
94+ public Builder command (String command ) {
95+ String [] cmd = command .split (" " );
96+ return command (cmd );
97+ }
98+
8399 /**
84100 * 延时、超时的时间单位,默认:ms {@link TimeUnit#MILLISECONDS}
85101 *
You can’t perform that action at this time.
0 commit comments