class CLIArgument<T> {
    /** */
    private final BiConsumer<String, T> EMPTY = (name, val) -> {};

    /** */
    private final String name;

    /** */
    private final String usage;

    /** */
    private final boolean isOptional;

    /** */
    private final Class<T> type;

    /** */
    private final Function<CLIArgumentParser, T> dfltValSupplier;

    /** */
    private final BiConsumer<String, T> validator;

    /** */
    public static <T> CLIArgument<T> optionalArg(String name, String usage, Class<T> type) {
        return new CLIArgument<>(name, usage, true, type, null, null);
    }

    /** */
    public static <T> CLIArgument<T> optionalArg(String name, String usage, Class<T> type, Supplier<T> dfltValSupplier) {<FILL_FUNCTION_BODY>}

    /** */
    public static <T> CLIArgument<T> optionalArg(
        String name,
        String usage,
        Class<T> type,
        Function<CLIArgumentParser, T> dfltValSupplier,
        BiConsumer<String, T> validator
    ) {
        return new CLIArgument<>(name, usage, true, type, dfltValSupplier, validator);
    }

    /** */
    public static <T> CLIArgument<T> mandatoryArg(String name, String usage, Class<T> type) {
        return new CLIArgument<>(name, usage, false, type, null, null);
    }

    /** */
    public CLIArgument(
        String name,
        String usage,
        boolean isOptional,
        Class<T> type,
        Function<CLIArgumentParser, T> dfltValSupplier,
        BiConsumer<String, T> validator
    ) {
        this.name = name;
        this.usage = usage;
        this.isOptional = isOptional;
        this.type = type;
        this.dfltValSupplier = dfltValSupplier == null
            ? (type.equals(Boolean.class) ? p -> (T)Boolean.FALSE : p -> null)
            : dfltValSupplier;
        this.validator = validator;
    }

    /** */
    public String name() {
        return name;
    }

    /** */
    public String usage() {
        return usage;
    }

    /** */
    public boolean optional() {
        return isOptional;
    }

    /** */
    public Class<T> type() {
        return type;
    }

    /** */
    public Function<CLIArgumentParser, T> defaultValueSupplier() {
        return dfltValSupplier;
    }

    /** */
    public BiConsumer<String, T> validator() {
        return validator == null ? EMPTY : validator;
    }
}

        return new CLIArgument<>(name, usage, true, type, p -> dfltValSupplier.get(), null);
    
<no_super_class>