Map<String, Object> attrs = new HashMap<String, Object>(); for (int i = offset; i < args.length; i+=2) { String n = args[i]; if (i+1 >= args.length) throw new ArgException("not enough arguments"); String v = args[i+1]; StringUtil.addToMultiMap(attrs, n, v);
try { return StringUtil.keyValueArrayToMultiMap(args, offset); } catch (IllegalArgumentException iae) { throw new ArgException("not enough arguments");
    private Map<String, Object> getMap(String[] args, int offset) throws ArgException {        Map<String, Object> attrs = new HashMap<String, Object>();        for (int i = offset; i < args.length; i+=2) {            String n = args[i];            if (i+1 >= args.length)                throw new ArgException("not enough arguments");            String v = args[i+1];            StringUtil.addToMultiMap(attrs, n, v);        }        return attrs;    }