Interface MapArbitrary<K,​V>

  • All Superinterfaces:
    Arbitrary<java.util.Map<K,​V>>, SizableArbitrary<java.util.Map<K,​V>>

    @API(status=MAINTAINED,
         since="1.3.2")
    public interface MapArbitrary<K,​V>
    extends SizableArbitrary<java.util.Map<K,​V>>
    Fluent interface to add functionality to arbitraries that generate instances of type Map
    • Method Detail

      • ofSize

        default MapArbitrary<K,​V> ofSize​(int size)
        Fix the size to size.
        Specified by:
        ofSize in interface SizableArbitrary<K>
        Parameters:
        size - The size of the generated map
        Returns:
        new arbitrary instance
      • ofMinSize

        MapArbitrary<K,​V> ofMinSize​(int minSize)
        Set lower size boundary minSize (included).
        Specified by:
        ofMinSize in interface SizableArbitrary<K>
        Parameters:
        minSize - The minimum size of the generated map
        Returns:
        new arbitrary instance
      • ofMaxSize

        MapArbitrary<K,​V> ofMaxSize​(int maxSize)
        Set upper size boundary maxSize (included).
        Specified by:
        ofMaxSize in interface SizableArbitrary<K>
        Parameters:
        maxSize - The maximum size of the generated map
        Returns:
        new arbitrary instance