Class BasicFreeChoicesHelper
java.lang.Object
org.sklsft.generator.bash.arguments.BasicFreeChoicesHelper
- All Implemented Interfaces:
ChoicesHelper
An abstract implementation of
ChoicesHelper
based on a free entry with possible check and conversion- Author:
- Nicolas Thibault
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
convertKey
(String key) can be overridden to convert inputEvery implementation should consider that invalid choices lead to null values that will be simply handled in a while conditionprotected boolean
can be overridden to validate input
-
Constructor Details
-
BasicFreeChoicesHelper
-
-
Method Details
-
getQuestion
-
getFullMessage
- Specified by:
getFullMessage
in interfaceChoicesHelper
-
getChoice
Description copied from interface:ChoicesHelper
Every implementation should consider that invalid choices lead to null values that will be simply handled in a while condition- Specified by:
getChoice
in interfaceChoicesHelper
- Parameters:
key
-- Returns:
-
convertKey
can be overridden to convert input- Parameters:
key
-- Returns:
-
isValid
can be overridden to validate input- Parameters:
key
-- Returns:
-