Interface SizableArbitrary<U>

All Superinterfaces:
All Known Subinterfaces:
ArrayArbitrary<T,A>, IteratorArbitrary<T>, ListArbitrary<T>, MapArbitrary<K,V>, SetArbitrary<T>, StreamableArbitrary<T,U>, StreamArbitrary<T>

@API(status=MAINTAINED, since="1.0") public interface SizableArbitrary<U> extends Arbitrary<U>
Fluent interface to configure arbitraries that have size constraints for generated values, e.g. collections and arrays.
  • Method Details

    • ofSize

      default SizableArbitrary<U> ofSize(int size)
      Fix the size to size.
    • ofMinSize

      SizableArbitrary<U> ofMinSize(int minSize)
      Set lower size boundary minSize (included).
    • ofMaxSize

      SizableArbitrary<U> ofMaxSize(int maxSize)
      Set upper size boundary maxSize (included).
    • withSizeDistribution

      @API(status=EXPERIMENTAL, since="1.5.3") SizableArbitrary<U> withSizeDistribution(RandomDistribution distribution)
      Set distribution distribution of size of generated arbitrary