Package org.instancio.generator.util
Class OneOfCollectionGenerator<T>
java.lang.Object
org.instancio.generator.AbstractGenerator<T>
org.instancio.generator.util.OneOfCollectionGenerator<T>
- All Implemented Interfaces:
Generator<T>
,GeneratorSpec<T>
,OneOfCollectionGeneratorSpec<T>
public class OneOfCollectionGenerator<T>
extends AbstractGenerator<T>
implements OneOfCollectionGeneratorSpec<T>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongenerate
(RandomProvider random) Returns a generated value.oneOf
(Collection<T> values) Methods inherited from class org.instancio.generator.AbstractGenerator
getContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.instancio.Generator
getHints, isDelegating, setDelegate, supports, targetClass
Methods inherited from interface org.instancio.generator.GeneratorSpec
name
-
Constructor Details
-
OneOfCollectionGenerator
-
-
Method Details
-
oneOf
- Specified by:
oneOf
in interfaceOneOfCollectionGeneratorSpec<T>
-
generate
Description copied from interface:Generator
Returns a generated value.If the generated value is random, it needs to be generated using the given
RandomProvider
instance. This ensures the data is generated with the same seed value and allows random data to be reproduced by specifying the seed value.
-