protected String randomValue ( List < String > values ) { if ( values == null || values . isEmpty ( ) ) { throw new InvalidFunctionUsageException ( "No values to choose from" ) ; } final int idx = random . nextInt ( values . size ( ) ) ; return values . get ( idx ) ; }
Pseudo - randomly choose one of the supplied values and return it .