Module de.cuioss.test.generator
Class VetoableGenerator<T>
java.lang.Object
de.cuioss.test.generator.internal.net.java.quickcheck.generator.support.VetoableGenerator<T>
- All Implemented Interfaces:
Generator<T>
- Direct Known Subclasses:
ExcludingGenerator,UniqueComparableValuesGenerator,UniqueValuesGenerator
Base class for generators which can reject the values generated by their
wrapped generator. This will be tried until the maximum number of tries is
reached.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedVetoableGenerator(Generator<? extends T> generator) protectedVetoableGenerator(Generator<? extends T> generator, int maxTries) -
Method Summary
-
Field Details
-
DEFAULT_MAX_TRIES
- See Also:
-
MIN_TRIES
- See Also:
-
-
Constructor Details
-
VetoableGenerator
-
VetoableGenerator
-
-
Method Details
-
next
Description copied from interface:GeneratorGenerates the next instance.- Specified by:
nextin interfaceGenerator<T>- Returns:
- a newly created instance
- Throws:
GeneratorException
-
tryValue
- Returns:
- true to accept the current value.
-