001package org.w3.ldp.testsuite.util;
002
003import org.apache.commons.cli.CommandLine;
004import org.apache.commons.cli.Option;
005
006import java.util.HashMap;
007import java.util.Map;
008
009public class CommandLineUtil {
010
011        public static Map<String, String> asMap(CommandLine cmd) {
012                Map<String, String> map = new HashMap<>();
013                for (Option option : cmd.getOptions()) {
014                        map.put(option.getLongOpt(), option.getValue());
015                }
016                return map;
017        }
018
019}