Class CollectionGeneratorSpecImpl<T>
java.lang.Object
org.instancio.internal.generator.AbstractGenerator<Collection<T>>
org.instancio.internal.generator.util.CollectionGenerator<T>
org.instancio.internal.generator.util.CollectionGeneratorSpecImpl<T>
- All Implemented Interfaces:
Generator<Collection<T>>,GeneratorSpec<Collection<T>>,CollectionGeneratorSpec<T>,NullableGeneratorSpec<Collection<T>>,SubtypeGeneratorSpec<Collection<T>>
-
Field Summary
Fields inherited from class org.instancio.internal.generator.util.CollectionGenerator
collectionType, isDelegating, maxSize, minSize, nullableElements, unique, withElements -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<T>tryGenerateNonNull(Random random) Makes the best effort to return a non-null value.Methods inherited from class org.instancio.internal.generator.util.CollectionGenerator
apiMethod, hints, maxSize, minSize, nullable, nullable, nullableElements, size, subtype, unique, withMethods inherited from class org.instancio.internal.generator.AbstractGenerator
generate, getContext, isNullable
-
Constructor Details
-
CollectionGeneratorSpecImpl
-
-
Method Details
-
tryGenerateNonNull
Description copied from class:AbstractGeneratorMakes the best effort to return a non-null value. However, in certain cases this method will produce anull.- Overrides:
tryGenerateNonNullin classCollectionGenerator<T>- Parameters:
random- for generating the value- Returns:
- generated value, either a null or non-null
-