Package net.jqwik.api

Schnittstelle ArbitrarySupplier<T extends @Nullable Object>

Alle Superschnittstellen:
Supplier<Arbitrary<T>>
Alle bekannten Implementierungsklassen:
ArbitrarySupplier.NONE

@API(status=MAINTAINED, since="1.7.0") public interface ArbitrarySupplier<T extends @Nullable Object> extends Supplier<Arbitrary<T>>
Implementations of this class are used to provide single arbitraries for ForAll parameters and parameter types annotated with From. Use ForAll.supplier() or From.supplier() attributes to specify the actual implementation class.

Either supplyFor(TypeUsage) or get() must be overridden. But not both.

Siehe auch:
  • Verschachtelte Klassen - Übersicht

    Verschachtelte Klassen
    Modifizierer und Typ
    Schnittstelle
    Beschreibung
    static class 
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    default @Nullable Arbitrary<T>
    get()
    Override this method if generating the arbitrary is straightforward.
    default @Nullable Arbitrary<T>
    supplyFor(TypeUsage targetType)
    Override this method if you need more information about the target type, e.g. annotations or type parameters.
  • Methodendetails

    • supplyFor

      default @Nullable Arbitrary<T> supplyFor(TypeUsage targetType)
      Override this method if you need more information about the target type, e.g. annotations or type parameters.

      This method takes precedence if both supplyFor(TypeUsage) and get() are overridden.

      Parameter:
      targetType - Specifies the type to generate.
      Gibt zurück:
      A new arbitrary instance
    • get

      default @Nullable Arbitrary<T> get()
      Override this method if generating the arbitrary is straightforward. This is probably the standard usage.

      Mind that supplyFor(TypeUsage) takes precedence if both supplyFor(TypeUsage) and get() are overridden.

      Angegeben von:
      get in Schnittstelle Supplier<T extends @Nullable Object>
      Gibt zurück:
      A new arbitrary instance