Class Derived<Derivate>

java.lang.Object
org.saynotobugs.confidence.junit5.engine.ResourceComposition<Derivate>
org.saynotobugs.confidence.junit5.engine.resource.Derived<Derivate>
All Implemented Interfaces:
org.dmfs.jems2.Fragile<ResourceHandle<Derivate>,Exception>, Resource<Derivate>

public final class Derived<Derivate> extends org.saynotobugs.confidence.junit5.engine.ResourceComposition<Derivate>
  • Constructor Details

    • Derived

      public Derived(org.dmfs.jems2.FragileFunction<? super Original,? extends Derivate,Exception> derivationFunction, Resource<Original> delegate)
      Derivate of an existing Resource. The resource is derived by applying the given FragileFunction on the original Resource value.

      Use this constructor when the derived Resource does not need a separate clean-up procedure.

    • Derived

      public Derived(org.dmfs.jems2.FragileFunction<? super Original,? extends Derivate,Exception> derivationFunction, Resource<Original> delegate, org.dmfs.jems2.FragileProcedure<Derivate,Exception> cleanUp)
      Derivate of an existing Resource. The resource is derived by applying the given FragileFunction on the original Resource value.

      The given clean-up procedure is executed when the resource is no longer needed.

    • Derived

      public Derived(org.dmfs.jems2.FragileBiFunction<? super Original1,? super Original2,? extends Derivate,Exception> derivationFunction, Resource<Original1> delegate1, Resource<Original2> delegate2)
      Derivate of two existing Resource. The resource is derived by applying the given FragileBiFunction on the original Resource values.

      Use this constructor when the derived Resource does not need a separate clean-up procedure.

    • Derived

      public Derived(org.dmfs.jems2.FragileBiFunction<? super Original1,? super Original2,? extends Derivate,Exception> derivationFunction, Resource<Original1> delegate1, Resource<Original2> delegate2, org.dmfs.jems2.FragileProcedure<Derivate,Exception> cleanUp)
      Derivate of two existing Resources. The resource is derived by applying the given FragileBiFunction on the original Resource values.

      The given clean-up procedure is executed when the resource is no longer needed.