![JAR search and dependency download from the Maven repository](/logo.png)
common.java.Args.ArgsHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tools Show documentation
Show all versions of tools Show documentation
NoobDogTools is a Java Helper library.
The newest version!
package common.java.Args;
import java.util.HashMap;
import java.util.Set;
public class ArgsHelper {
public static HashMap dictionary(String[] args) {
HashMap dictionary = new HashMap<>();
for (int i = 0; i < args.length; i++) {
String arg = args[i];
if (arg.startsWith("-")) {
if (i + 1 < args.length) {
dictionary.put(arg, args[i + 1]);
}
}
}
return dictionary;
}
public static Set keys(String[] args) {
return dictionary(args).keySet();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy