Class GenericCollectionGenerator<T>
- java.lang.Object
-
- org.kurtymckurt.TestPojo.generators.collections.GenericCollectionGenerator<T>
-
- All Implemented Interfaces:
Generator<Collection<T>>
- Direct Known Subclasses:
BlockingDequeGenerator,ListGenerator,NavigableSetGenerator,QueueGenerator,SetGenerator
public abstract class GenericCollectionGenerator<T> extends Object implements Generator<Collection<T>>
-
-
Constructor Summary
Constructors Constructor Description GenericCollectionGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<T>generate(Class<?> clazz, Field field, Limiter limiter, PojoBuilderConfiguration pojoBuilderConfiguration)Generates an instance of this class with random test databooleansupportsType(Class<?> clazz)Returns true if this Generator can generate an instance of this class.
-
-
-
Method Detail
-
generate
public Collection<T> generate(Class<?> clazz, Field field, Limiter limiter, PojoBuilderConfiguration pojoBuilderConfiguration)
Description copied from interface:GeneratorGenerates an instance of this class with random test data- Specified by:
generatein interfaceGenerator<T>- Parameters:
clazz- class to createfield- used to determine generic type (i.e. collections)limiter- used to limit the randomness of the datapojoBuilderConfiguration- The pojo builder configuration used to create objects in case the generator needs to create an object, it can come with user provided generators, providers, etc.- Returns:
-
supportsType
public boolean supportsType(Class<?> clazz)
Description copied from interface:GeneratorReturns true if this Generator can generate an instance of this class.- Specified by:
supportsTypein interfaceGenerator<T>- Parameters:
clazz- class instance to check- Returns:
- true if it can create an instance of that class.
-
-