Class AbstractGenerationStatus

java.lang.Object
com.pholser.junit.quickcheck.internal.generator.AbstractGenerationStatus
All Implemented Interfaces:
GenerationStatus
Direct Known Subclasses:
PropertyParameterGenerationContext, SimpleGenerationStatus

abstract class AbstractGenerationStatus extends Object implements GenerationStatus
  • Field Details

  • Constructor Details

  • Method Details

    • setValue

      public <T> GenerationStatus setValue(GenerationStatus.Key<T> key, T value)
      Description copied from interface: GenerationStatus
      Associates the given value with the given key for the duration of the generation of a value for a property parameter, or until overwritten.
      Specified by:
      setValue in interface GenerationStatus
      Type Parameters:
      T - type of the value
      Parameters:
      key - a key to associate with a value
      value - the associated value
      Returns:
      self, so that calls to this method can be chained
    • valueOf

      public <T> Optional<T> valueOf(GenerationStatus.Key<T> key)
      Description copied from interface: GenerationStatus
      Retrieves the value associated with the given key.
      Specified by:
      valueOf in interface GenerationStatus
      Type Parameters:
      T - type of the value associated with the key
      Parameters:
      key - key to look up
      Returns:
      the (optional) associated value
    • size

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

      protected final SourceOfRandomness random()