isOptional

public boolean isOptional()

Whether this argument may be omitted by the user. Optional arguments must be trailing (you can't have a required arg after an optional one). Default is false — implementations don't have to override.

addOptionalArgument wraps any ICommandArgument in an internal decorator that flips this flag, so callers usually don't implement it directly.