jdk/src/share/classes/java/lang/ProcessBuilder.java
changeset 7803 56bc97d69d93
parent 7515 43202796198e
child 7816 55a18147b4bf
equal deleted inserted replaced
7802:74f2ee2b62ba 7803:56bc97d69d93
   212      * command.
   212      * command.
   213      *
   213      *
   214      * @param command a string array containing the program and its arguments
   214      * @param command a string array containing the program and its arguments
   215      */
   215      */
   216     public ProcessBuilder(String... command) {
   216     public ProcessBuilder(String... command) {
   217         this.command = new ArrayList<String>(command.length);
   217         this.command = new ArrayList<>(command.length);
   218         for (String arg : command)
   218         for (String arg : command)
   219             this.command.add(arg);
   219             this.command.add(arg);
   220     }
   220     }
   221 
   221 
   222     /**
   222     /**
   249      *
   249      *
   250      * @param  command a string array containing the program and its arguments
   250      * @param  command a string array containing the program and its arguments
   251      * @return this process builder
   251      * @return this process builder
   252      */
   252      */
   253     public ProcessBuilder command(String... command) {
   253     public ProcessBuilder command(String... command) {
   254         this.command = new ArrayList<String>(command.length);
   254         this.command = new ArrayList<>(command.length);
   255         for (String arg : command)
   255         for (String arg : command)
   256             this.command.add(arg);
   256             this.command.add(arg);
   257         return this;
   257         return this;
   258     }
   258     }
   259 
   259