com.pholser.junit.quickcheck.internal.generator
Class GenerationContext

java.lang.Object
  extended by com.pholser.junit.quickcheck.internal.generator.GenerationContext
All Implemented Interfaces:
GenerationStatus

public class GenerationContext
extends Object
implements GenerationStatus


Nested Class Summary
static class GenerationContext.DiscardRatioExceededException
           
 
Constructor Summary
GenerationContext(ParameterContext parameter, GeneratorRepository repository)
           
 
Method Summary
 int attempts()
           
 Object generate(SourceOfRandomness random)
           
 boolean shouldContinue()
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenerationContext

public GenerationContext(ParameterContext parameter,
                         GeneratorRepository repository)
Method Detail

generate

public Object generate(SourceOfRandomness random)

shouldContinue

public boolean shouldContinue()

size

public int size()
Specified by:
size in interface GenerationStatus
Returns:
an arbitrary "size" parameter; this value increases for every successful generation

attempts

public int attempts()
Specified by:
attempts in interface GenerationStatus
Returns:
how many attempts have been made to generate a value for a theory parameter; generally greater than or equal to GenerationStatus.size().


Copyright © 2013. All Rights Reserved.