Package io.gatling.plugin.io.input
Class InputChoice
java.lang.Object
io.gatling.plugin.io.input.InputChoice
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TinputFromList(List<T> choices, Function<T, String> show) User must choose an input from the list<T> TinputFromList(List<T> choices, Function<T, String> show, Comparator<T> orderBy) User must choose an input from the listinputFromStringList(List<String> choices, boolean sorted) User must choose an input from the listintinputInt(int inclusiveMin) Read a non negative number, inferior to maxintinputInt(int inclusiveMin, int exclusiveMax) Read a non negative number, inferior to maxinputStringWithDefault(String defaultValue, LambdaExceptionUtil.ConsumerWithExceptions<String, IllegalArgumentException> validator)
-
Constructor Details
-
InputChoice
-
-
Method Details
-
inputInt
public int inputInt(int inclusiveMin) Read a non negative number, inferior to max- Parameters:
inclusiveMin- inclusive minimum value of user entry
-
inputInt
public int inputInt(int inclusiveMin, int exclusiveMax) Read a non negative number, inferior to max- Parameters:
inclusiveMin- inclusive minimum value of user entryexclusiveMax- exclusive maximum value of user entry
-
inputString
public String inputString(LambdaExceptionUtil.ConsumerWithExceptions<String, IllegalArgumentException> validator) -
inputStringWithDefault
public String inputStringWithDefault(String defaultValue, LambdaExceptionUtil.ConsumerWithExceptions<String, IllegalArgumentException> validator) -
inputFromList
User must choose an input from the list- Parameters:
choices- possible results, must not be emptyshow- used to display a choice- Throws:
UserQuitException- if the user chooses to cancel the operation
-
inputFromList
public <T> T inputFromList(List<T> choices, Function<T, String> show, Comparator<T> orderBy) throws UserQuitExceptionUser must choose an input from the list- Parameters:
choices- possible results, must not be emptyshow- used to display a choiceorderBy- a comparator used for sorting the list of choices- Throws:
UserQuitException- if the user chooses to cancel the operation
-
inputFromStringList
User must choose an input from the list- Parameters:
choices- possible results, must not be emptysorted- whether the list should be sorted or not- Throws:
UserQuitException- if the user chooses to cancel the operation
-