Interface UsageVerifier<S extends Source>
Verifies that the
CommandUsage is suitable
to be added to the command
Rule(s) recommended following when creating a usage:
1) A usage MUST have AT LEAST ONE required parameter at the beginning before any other parameters whether optional or required
2) If the usage doesn't have any subcommands, it must not be duplicated in a similar parameters pattern
3) It MUSTN'T have a greedy argument in the middle of the parameters, therefore, if you want to add any greedy arguments, you should put A SINGLE (not multiple) greedy argument at the END of the usage parameters list ONLY
-
Method Summary
Modifier and TypeMethodDescriptionbooleanareAmbiguous(CommandUsage<S> firstUsage, CommandUsage<S> secondUsage) static <S extends Source>
UsageVerifier<S>static <S extends Source>
UsageVerifier<S>booleanverify(CommandUsage<S> usage)
-
Method Details
-
simpleVerifier
-
typeTolerantVerifier
-
verify
- Parameters:
usage- the usage- Returns:
- Verifies the usage to be acceptable
-
areAmbiguous
- Parameters:
firstUsage- the first usagesecondUsage- the second usage- Returns:
- whether both usages are similar and/or share similar indistinguishable parameters or syntax
-