Class UniqueComparableValuesGenerator<T>
- java.lang.Object
-
- de.cuioss.test.generator.internal.net.java.quickcheck.generator.support.VetoableGenerator<T>
-
- de.cuioss.test.generator.internal.net.java.quickcheck.generator.support.UniqueComparableValuesGenerator<T>
-
- All Implemented Interfaces:
Generator<T>,StatefulGenerator<T>
public class UniqueComparableValuesGenerator<T> extends VetoableGenerator<T>
-
-
Field Summary
-
Fields inherited from class de.cuioss.test.generator.internal.net.java.quickcheck.generator.support.VetoableGenerator
DEFAULT_MAX_TRIES, MIN_TRIES
-
-
Constructor Summary
Constructors Constructor Description UniqueComparableValuesGenerator(Generator<T> generator, Comparator<? super T> comparator, int maxTries)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidreset()Resets the state of the generator to the state it had immediately after construction.protected booleantryValue(T value)-
Methods inherited from class de.cuioss.test.generator.internal.net.java.quickcheck.generator.support.VetoableGenerator
next
-
-
-
-
Constructor Detail
-
UniqueComparableValuesGenerator
public UniqueComparableValuesGenerator(Generator<T> generator, Comparator<? super T> comparator, int maxTries)
-
-
Method Detail
-
tryValue
protected boolean tryValue(T value)
- Specified by:
tryValuein classVetoableGenerator<T>- Returns:
- true to accept the current value.
-
reset
public void reset()
Description copied from interface:StatefulGeneratorResets the state of the generator to the state it had immediately after construction.Makes a heavy weight generator reusable.
- Specified by:
resetin interfaceStatefulGenerator<T>
-
-