Java Args Parse parse(String[] args)

Here you can find the source of parse(String[] args)

Description

parse

License

Apache License

Declaration

public static Map<String, String> parse(String[] args) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.HashMap;
import java.util.Map;

public class Main {
    public static Map<String, String> parse(String[] args) {
        HashMap<String, String> ret = new HashMap<>();
        for (int i = 0; i < args.length; i += 2) {
            String key = args[i].substring(1);
            ret.put(key.substring(1), args[i + 1]);
        }// w w  w  .  ja  v  a2  s .c o  m
        return ret;
    }
}

Related

  1. getPossibleCompletionsForGivenArgs(String[] args, String[] possibilitiesOfCompletion)
  2. getPossibleCompletionsForGivenArgs(String[] args, String[] possibilitiesOfCompletion)
  3. parse(String[] args)
  4. parseAndFillFittingValues(String[] prefixes, String[] values)
  5. parseArg(String[] args)
  6. parseArgs(String argvStart, String[] args)
  7. parseArgs(String[] args)