Package org.instancio.generator.specs
Interface ShuffleSpec<T>
- Type Parameters:
T- the type of elements
- All Superinterfaces:
GeneratorSpec<Collection<T>>,Supplier<Collection<T>>,ValueSpec<Collection<T>>
Spec for shuffling elements in a random order,
providing the results as a
Collection.- Since:
- 5.0.0
-
Method Summary
Modifier and TypeMethodDescriptionshuffle(Collection<T> collection) Creates a copy of the specified collection and shuffles its elements.Creates a copy of the specified array and shuffles its elements.
-
Method Details
-
shuffle
Creates a copy of the specified array and shuffles its elements.- Parameters:
array- containing the elements to shuffle- Returns:
- spec builder
- Since:
- 5.0.0
-
shuffle
Creates a copy of the specified collection and shuffles its elements.- Parameters:
collection- containing the elements to shuffle- Returns:
- spec builder
- Since:
- 5.0.0
-