private boolean booleanOption(String s) {
        if (s == null)  return true;
        switch (s) {
            case "true":  case "yes": case "on":  case "1": return true;
            case "false": case "no":  case "off": case "0": return false;
        }
        throw new IllegalArgumentException("unrecognized boolean flag="+s);
    }