retrieve values as list
This commit is contained in:
parent
6e0e21beca
commit
81c80c3750
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Written by Marcel M. Otte, (c) 2013 For use under the BSD 2-clause License,
|
* Written by Marcel M. Otte, (c) 2013 For use under the BSD 2-clause License,
|
||||||
|
@ -167,6 +168,13 @@ public class CmdOptions {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<String> getValuesAsList(String name) {
|
||||||
|
if (options.get(name).getValues().size() > 0) {
|
||||||
|
return options.get(name).getValues();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer[] getOptionAsInt(String name) {
|
public Integer[] getOptionAsInt(String name) {
|
||||||
if (options.get(name).values.size() > 0) {
|
if (options.get(name).values.size() > 0) {
|
||||||
ArrayList<Integer> list = new ArrayList<Integer>();
|
ArrayList<Integer> list = new ArrayList<Integer>();
|
||||||
|
|
Loading…
Reference in New Issue