Returns a random element from an varargs. @param options The varargs to take a random element from. @param The type of the elements in the varargs. @return A randomly selected element from the varargs.
(E... options)
| 17 | * @return A randomly selected element from the varargs. |
| 18 | */ |
| 19 | public <E> E option(E... options) { |
| 20 | return options[faker.random().nextInt(options.length)]; |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * Returns a random element from Enum. |