Package net.sourceforge.argparse4j.inf
Interface ArgumentChoice
-
- All Known Implementing Classes:
CollectionArgumentChoice,RangeArgumentChoice
public interface ArgumentChoiceThis interface defines simple data validation method.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontains(Object val)Returnstrueiffvalis valid choice according to this object's constraint.StringtextualFormat()Return textual representation of this choice.
-
-
-
Method Detail
-
contains
boolean contains(Object val)
Returns
trueiffvalis valid choice according to this object's constraint.If the objects derived from
RuntimeExceptionare thrown because of invalid input from command line, subclass must catch these exceptions and returnfalse.- Parameters:
val- The attribute value.- Returns:
trueorfalse.
-
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.
-
-