public class PropertyParameterGenerationContext extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PropertyParameterGenerationContext.DiscardRatioExceededException |
GenerationStatus.Key<T>| Constructor and Description |
|---|
PropertyParameterGenerationContext(PropertyParameterContext parameter,
GeneratorRepository repository,
GeometricDistribution distro,
SourceOfRandomness random,
ParameterSampler sampler) |
| Modifier and Type | Method and Description |
|---|---|
int |
attempts() |
long |
effectiveSeed() |
Object |
generate() |
BigDecimal |
magnitude(Object value) |
String |
name() |
protected SourceOfRandomness |
random() |
int |
sampleSize() |
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.
|
List<Object> |
shrink(Object larger) |
int |
size() |
<T> Optional<T> |
valueOf(GenerationStatus.Key<T> key)
Retrieves the value associated with the given key.
|
public PropertyParameterGenerationContext(PropertyParameterContext parameter, GeneratorRepository repository, GeometricDistribution distro, SourceOfRandomness random, ParameterSampler sampler)
public Object generate()
public int size()
size in interface GenerationStatuspublic int attempts()
public void semiAttempt()
GenerationStatusSignals 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.
public long effectiveSeed()
public int sampleSize()
public String name()
public BigDecimal magnitude(Object value)
public <T> GenerationStatus setValue(GenerationStatus.Key<T> key, T value)
GenerationStatussetValue in interface GenerationStatusT - type of the valuekey - a key to associate with a valuevalue - the associated valuepublic <T> Optional<T> valueOf(GenerationStatus.Key<T> key)
GenerationStatusvalueOf in interface GenerationStatusT - type of the value associated with the keykey - key to look upprotected final SourceOfRandomness random()
Copyright © 2019. All rights reserved.