net.java.quickcheck.generator.support
Class UniqueComparableValuesGenerator<T>
java.lang.Object
net.java.quickcheck.generator.support.VetoableGenerator<T>
net.java.quickcheck.generator.support.UniqueComparableValuesGenerator<T>
- All Implemented Interfaces:
- Generator<T>, StatefulGenerator<T>
public class UniqueComparableValuesGenerator<T>
- extends VetoableGenerator<T>
Method Summary |
void |
reset()
Resets the state of the generator to the state it had immediately after
construction. |
protected boolean |
tryValue(T value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.java.quickcheck.Generator |
next |
UniqueComparableValuesGenerator
public UniqueComparableValuesGenerator(Generator<T> generator,
Comparator<? super T> comparator,
int maxTries)
tryValue
protected boolean tryValue(T value)
- Specified by:
tryValue
in class VetoableGenerator<T>
- Returns:
- true to accept the current value.
reset
public void reset()
- Description copied from interface:
StatefulGenerator
- Resets the state of the generator to the state it had immediately after
construction.
Makes a heavy weight generator reusable.
- Specified by:
reset
in interface StatefulGenerator<T>
Copyright © 2011. All Rights Reserved.