Interface ArrayArbitrary<T,​A>

    • Method Detail

      • uniqueElements

        @API(status=MAINTAINED,
             since="1.4.0")
        ArrayArbitrary<T,​A> uniqueElements()
        Add the constraint that elements of the generated array must be unique, i.e. no two elements must return true when being compared using Object.equals(Object).

        The constraint can be combined with other uniqueElements(Function) constraints.

        Returns:
        new arbitrary instance
      • uniqueElements

        @API(status=MAINTAINED,
             since="1.4.0")
        ArrayArbitrary<T,​A> uniqueElements​(java.util.function.Function<T,​java.lang.Object> by)
        Add the constraint that elements of the generated array must be unique relating to an element's "feature" being extracted using the by function. The extracted features are being compared using Object.equals(Object).

        The constraint can be combined with other uniqueElements(Function) constraints.

        Returns:
        new arbitrary instance