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

java.lang.Object
  extended by com.pholser.junit.quickcheck.generator.Generator<Enum>
      extended by com.pholser.junit.quickcheck.internal.generator.EnumGenerator

public class EnumGenerator
extends Generator<Enum>


Constructor Summary
EnumGenerator(Class<?> enumType)
           
 
Method Summary
 void configure(ValuesOf flag)
           
 Enum<?> generate(SourceOfRandomness random, GenerationStatus status)
          Produces a value for a theory parameter.
 
Methods inherited from class com.pholser.junit.quickcheck.generator.Generator
addComponentGenerators, canGenerateForParametersOfTypes, canRegisterAsType, compatibleWithTypeParameter, configure, hasComponents, numberOfNeededComponents, types
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumGenerator

public EnumGenerator(Class<?> enumType)
Method Detail

configure

public void configure(ValuesOf flag)

generate

public Enum<?> generate(SourceOfRandomness random,
                        GenerationStatus status)
Description copied from class: Generator

Produces a value for a theory parameter.

A generator may raise an unchecked exception if some condition exists which would lead to a confusing generation -- for example, if a generator honored a range configuration, and the endpoints were transposed.

Specified by:
generate in class Generator<Enum>
Parameters:
random - a source of randomness to be used when generating the value
status - an object that the generator can use to influence the value it produces. For example, a generator for lists can use the size method to generate lists with a given number of elements.
Returns:
the generated value


Copyright © 2013. All Rights Reserved.