From 81c80c37500706400e3af32cb375c3781df8249c Mon Sep 17 00:00:00 2001 From: Marcel Otte Date: Tue, 9 Dec 2014 19:36:05 +0100 Subject: [PATCH] retrieve values as list --- java/src/to/mmo/cmdlineoptions/CmdOptions.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/java/src/to/mmo/cmdlineoptions/CmdOptions.java b/java/src/to/mmo/cmdlineoptions/CmdOptions.java index c27755e..046f1a0 100644 --- a/java/src/to/mmo/cmdlineoptions/CmdOptions.java +++ b/java/src/to/mmo/cmdlineoptions/CmdOptions.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.HashMap; +import java.util.List; /** * Written by Marcel M. Otte, (c) 2013 For use under the BSD 2-clause License, @@ -167,6 +168,13 @@ public class CmdOptions { return null; } + public List getValuesAsList(String name) { + if (options.get(name).getValues().size() > 0) { + return options.get(name).getValues(); + } + return null; + } + public Integer[] getOptionAsInt(String name) { if (options.get(name).values.size() > 0) { ArrayList list = new ArrayList();