(String key, Supplier<String> def)
| 131 | |
| 132 | |
| 133 | public static String getString(String key, Supplier<String> def) { |
| 134 | Dict.Prop pp = new Dict.Prop(key); |
| 135 | boolean found = dict().has(pp); |
| 136 | |
| 137 | Object out = dict().computeIfAbsent(pp, (k) -> def.get()); |
| 138 | String r = out == null ? null : ("" + out); |
| 139 | |
| 140 | System.err.println("-" + key + " = " + r + (found ? "" : "(default)")); |
| 141 | |
| 142 | return r; |
| 143 | } |
| 144 | |
| 145 | public static String getDirectory(String key, Supplier<String> def) { |
| 146 | String v = getString(key, def); |
no test coverage detected