public interface GenerationStatus
Generators are fed instances of this interface on each generation
so that, if they choose, they can use these instances to influence the
results of a generation for a particular property parameter.| Modifier and Type | Interface and Description |
|---|---|
static class |
GenerationStatus.Key<T>
|
| Modifier and Type | Method and Description |
|---|---|
int |
attempts() |
default void |
semiAttempt()
Signals part of an attempt to generate a value.
|
<T> GenerationStatus |
setValue(GenerationStatus.Key<T> key,
T value)
Associates the given value with the given key for the duration of the
generation of a value for a property parameter, or until overwritten.
|
int |
size() |
<T> Optional<T> |
valueOf(GenerationStatus.Key<T> key)
Retrieves the value associated with the given key.
|
int size()
int attempts()
default void semiAttempt()
Signals part of an attempt to generate a value.
Mostly for use by junit-quickcheck itself; generators can call this to convince the framework that it's doing work to generate a complex value, but doing so is not strictly necessary.
<T> GenerationStatus setValue(GenerationStatus.Key<T> key, T value)
T - type of the valuekey - a key to associate with a valuevalue - the associated value<T> Optional<T> valueOf(GenerationStatus.Key<T> key)
T - type of the value associated with the keykey - key to look upCopyright © 2019. All rights reserved.