code: @SuppressWarnings("unchecked")
      public <T> T getTypedValue(Option option) throws OptionParserException {
          if (option == null) {
              return null;
          }
          String value = getValue(option);
          if (value == null) {
              return null;
          }
          OptionValueType valueType = option.getValueType();
          if (valueType == OptionValueType.STRING) {
              return (T)value;
          } else if (valueType == OptionValueType.INT) {
              try {
                  return (T)Integer.valueOf(value);
              } catch(NumberFormatException e) {
                  throw new OptionParserException(e.getMessage());
              }
          } else if (valueType == OptionValueType.LONG) {
              try {
                  return (T)Long.valueOf(value);
              } catch(NumberFormatException e) {
                  throw new OptionParserException(e.getMessage());
              }
          } else if (valueType == OptionValueType.FLOAT) {
              try {
                  return (T)Float.valueOf(value);
              } catch(NumberFormatException e) {
                  throw new OptionParserException(e.getMessage());
              }
          } else if (valueType == OptionValueType.DOUBLE) {
              try {
                  return (T)Double.valueOf(value);
              } catch(NumberFormatException e) {
                  throw new OptionParserException(e.getMessage());
              }
          } else if (valueType == OptionValueType.BOOLEAN) {
              try {
                  return (T)Boolean.valueOf(value);
              } catch(NumberFormatException e) {
                  throw new OptionParserException(e.getMessage());
              }
          } else if (valueType == OptionValueType.FILE) {
              return (T)new File(value);
          } else {
              return null;
          }
      }
docs: Return a version of this {@code Option} converted to a particular type.
  
  @param <T> type to attempt to convert to
  @param option the option
  @return the value parsed into a particular object
  @throws OptionParserException if there are problems turning the option value into the desired type