checkEncountered

fun checkEncountered(key: OptionKeyType, timesAllowed: Int)

If the specified key was encountered more times than allowed, then throw an OptionProcessingException. A key is considered encountered before running any user supplied action for it.

Parameters

key

An option key.

timesAllowed

The maximum number of times that the option key may be specified.

Throws

If key was processed more than timesAllowed times.