MCPcopy Create free account
hub / github.com/Whiley/WhileyCompiler / splitConfig

Method splitConfig

src/main/java/wycc/util/OptArg.java:431–439  ·  view source on GitHub ↗

This splits strings of the form "x=y,v=w" into distinct components and puts them into a map. In the case of a string like "x,y=z" then x is loaded with the empty string. @param str @return

(String str)

Source from the content-addressed store, hash-verified

429 * @return
430 */
431 private static Map<String, Object> splitConfig(String str) {
432 HashMap<String, Object> options = new HashMap<>();
433 String[] splits = str.split(",");
434 for (String s : splits) {
435 String[] p = s.split("=");
436 options.put(p[0], parseValue(p[1]));
437 }
438 return options;
439 }
440
441 private static Object parseValue(String str) {
442 if(str.equals("true")) {

Callers 1

processMethod · 0.80

Calls 1

parseValueMethod · 0.95

Tested by

no test coverage detected