- All Known Implementing Classes:
CollectionArgumentChoice
,RangeArgumentChoice
public interface ArgumentChoice
This interface defines simple data validation method.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
iffval
is valid choice according to this object's constraint.Return textual representation of this choice.
-
Method Details
-
contains
Returns
true
iffval
is valid choice according to this object's constraint.If the objects derived from
RuntimeException
are thrown because of invalid input from command line, subclass must catch these exceptions and returnfalse
.- Parameters:
val
- The attribute value.- Returns:
true
orfalse
.
-
textualFormat
String textualFormat()Return textual representation of this choice.
This string will be used in help and error messages.
- Returns:
- The textual representation of this choice.
-