net.java.quickcheck.generator.support
Class UniqueValuesGenerator<T>
java.lang.Object
net.java.quickcheck.generator.support.VetoableGenerator<T>
net.java.quickcheck.generator.support.UniqueValuesGenerator<T>
- All Implemented Interfaces:
- Generator<T>, StatefulGenerator<T>
public class UniqueValuesGenerator<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 |
UniqueValuesGenerator
public UniqueValuesGenerator(Generator<? extends T> generator,
int defaultMaxTries)
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.