public Builder setArguments(String[] arguments) { checkNotNull(arguments, "arguments"); String[] newArguments = new String[arguments.length + 1]; newArguments[0] = "_"; System.arraycopy(arguments, 0, newArguments, 1, arguments.length); this.arguments = newArguments; return this; }
public String[] getParsedPaddedSlice(int index, int padding) { String[] slice = new String[parsedArgs.size() - index + padding]; System.arraycopy( parsedArgs.toArray(new String[parsedArgs.size()]), index, slice, padding, parsedArgs.size() - index); return slice; }
public String[] getParsedSlice(int index) { String[] slice = new String[parsedArgs.size() - index]; System.arraycopy( parsedArgs.toArray(new String[parsedArgs.size()]), index, slice, 0, parsedArgs.size() - index); return slice; }
public String[] getPaddedSlice(int index, int padding) { String[] slice = new String[originalArgs.length - index + padding]; System.arraycopy(originalArgs, index, slice, padding, originalArgs.length - index); return slice; }
public String[] getSlice(int index) { String[] slice = new String[originalArgs.length - index]; System.arraycopy(originalArgs, index, slice, 0, originalArgs.length - index); return slice; }