tryParse

abstract fun tryParse(arg: String, previousValue: T?): T?

Attempts to parse a command-line argument into a value of type T.

Return

The parsed value, or null if the argument couldn't be parsed by this handler

Parameters

arg

The command-line argument to parse

previousValue

The previously parsed value, if any

Throws

if the argument is recognized but invalid