Class EitherGenerator

java.lang.Object
com.pholser.junit.quickcheck.generator.Generator<io.atlassian.fugue.Either<?,?>>
com.pholser.junit.quickcheck.generator.ComponentizedGenerator<io.atlassian.fugue.Either<?,?>>
io.atlassian.fugue.quickcheck.EitherGenerator
All Implemented Interfaces:
com.pholser.junit.quickcheck.generator.Gen<io.atlassian.fugue.Either<?,?>>, com.pholser.junit.quickcheck.generator.Shrink<io.atlassian.fugue.Either<?,?>>

public class EitherGenerator extends com.pholser.junit.quickcheck.generator.ComponentizedGenerator<io.atlassian.fugue.Either<?,?>>
Produces values of type Either.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<io.atlassian.fugue.Either<?,?>>
    doShrink(com.pholser.junit.quickcheck.random.SourceOfRandomness random, io.atlassian.fugue.Either<?,?> larger)
     
    io.atlassian.fugue.Either<?,?>
    generate(com.pholser.junit.quickcheck.random.SourceOfRandomness random, com.pholser.junit.quickcheck.generator.GenerationStatus status)
     
    int
     

    Methods inherited from class com.pholser.junit.quickcheck.generator.ComponentizedGenerator

    addComponentGenerators, canGenerateForParametersOfTypes, canRegisterAsType, componentGenerators, configure, hasComponents, provide

    Methods inherited from class com.pholser.junit.quickcheck.generator.Generator

    canShrink, compatibleWithTypeParameter, configurationAnnotationsOn, configure, copy, gen, gen, magnitude, narrow, shrink, types

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.pholser.junit.quickcheck.generator.Gen

    _gen, filter, filterOptional, flatMap, map, times
  • Constructor Details

    • EitherGenerator

      public EitherGenerator()
  • Method Details

    • generate

      public io.atlassian.fugue.Either<?,?> generate(com.pholser.junit.quickcheck.random.SourceOfRandomness random, com.pholser.junit.quickcheck.generator.GenerationStatus status)
    • doShrink

      public List<io.atlassian.fugue.Either<?,?>> doShrink(com.pholser.junit.quickcheck.random.SourceOfRandomness random, io.atlassian.fugue.Either<?,?> larger)
      Overrides:
      doShrink in class com.pholser.junit.quickcheck.generator.Generator<io.atlassian.fugue.Either<?,?>>
    • numberOfNeededComponents

      public int numberOfNeededComponents()
      Overrides:
      numberOfNeededComponents in class com.pholser.junit.quickcheck.generator.Generator<io.atlassian.fugue.Either<?,?>>