code: public static boolean getBooleanValue(String value) throws IllegalArgumentException {
          require("true".equalsIgnoreCase(value) || "false".equalsIgnoreCase(value),
                  "'true' or 'false' expected: " + value);
          return "true".equalsIgnoreCase(value);
      }
docs: Verify that the given value is either "true" or "false" and return the corresponding
  boolean value. If the value is invalid, an IllegalArgumentException is thrown.
  
  @param value Candidate boolean value in string form.
  @return      Boolean value of string if valid.
  @throws IllegalArgumentException If the valie is not "true" or "false".