added shorter 'get()' method for Option values

This commit is contained in:
Marcel Otte 2014-12-09 19:33:50 +01:00
parent 469a5009a8
commit 6e0e21beca
1 changed files with 4 additions and 0 deletions

View File

@ -155,6 +155,10 @@ public class CmdOptions {
return o; return o;
} }
public String[] get(String name) {
return getOption(name);
}
public String[] getOption(String name) { public String[] getOption(String name) {
if (options.get(name).values.size() > 0) if (options.get(name).values.size() > 0)
return options.get(name).values.toArray(new String[0]); return options.get(name).values.toArray(new String[0]);