public class Options extends Object
Modifier | Constructor and Description |
---|---|
protected |
Options(Faker faker) |
Modifier and Type | Method and Description |
---|---|
<E> E |
nextElement(E[] array)
Returns a random element from an array.
|
<E> E |
nextElement(List<E> list)
Returns a random element from a list.
|
<E extends Enum<E>> |
option(Class<E> enumeration)
Returns a random element from Enum.
|
<E> E |
option(E... options)
Returns a random element from an varargs.
|
protected Options(Faker faker)
public <E> E option(E... options)
E
- The type of the elements in the varargs.options
- The varargs to take a random element from.public <E extends Enum<E>> E option(Class<E> enumeration)
enumeration
- The Enum to take a random element from.public <E> E nextElement(E[] array)
E
- The type of the elements in the array.array
- The array to take a random element from.public <E> E nextElement(List<E> list)
E
- The type of the elements in the list.list
- The list to take a random element from.Copyright © 2019. All rights reserved.