static <T> ArgumentParser<T> of(Function<String, Optional<T>> parseFunction, Function<String, CommandInterruptException> generateExceptionFunction) {
        return new ArgumentParser<T>() {
            @Override
            public Optional<T> parse(@Nonnull String t) {
                return parseFunction.apply(t);
            }

            @Override
            public CommandInterruptException generateException(@Nonnull String s) {
                return generateExceptionFunction.apply(s);
            }
        };
    }
Parses an argument from a String

@param <T> the value type
helper/src/main/java/me/lucko/helper/command/argument/ArgumentParser.java