Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Hashim committed Aug 4, 2017
1 parent 1ba52c6 commit 753dce3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/mhashem6/commander/CommandBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public CommandBuilder forCommandLine(String line) {
/**
* will clear any previous options if any
*/
public CommandBuilder withOptions(String[] params) {
public CommandBuilder withOptions(String... params) {
commandOptions.clear();
if (params != null && params.length != 0)
commandOptions.addAll(Arrays.asList(params));
Expand All @@ -64,7 +64,7 @@ public CommandBuilder withOptions(String[] params) {
/**
* will clear any previous args if any
*/
public CommandBuilder withArgs(String[] args) {
public CommandBuilder withArgs(String... args) {
commandArgs.clear();
if (args != null && args.length != 0)
commandArgs.addAll(Arrays.asList(args));
Expand Down Expand Up @@ -95,9 +95,7 @@ public String[] options() {
public String[] args() {
return commandArgs.toArray(new String[commandArgs.size()]);
}

};

}
// ============================================================

Expand Down

0 comments on commit 753dce3

Please sign in to comment.