Class LazyResource<T>
java.lang.Object
org.saynotobugs.confidence.junit5.engine.resource.LazyResource<T>
- All Implemented Interfaces:
org.dmfs.jems2.Fragile<ResourceHandle<T>,,Exception> Resource<T>
-
Constructor Summary
ConstructorsConstructorDescriptionLazyResource(org.dmfs.jems2.Fragile<Context, Exception> contextSource, org.dmfs.jems2.FragileFunction<? super Context, ? extends T, Exception> contextToValueFunction, org.dmfs.jems2.FragileBiProcedure<? super T, ? super Context, Exception> cleanUp) Constructor of aResourcethat's created lazily from a given context.LazyResource(org.dmfs.jems2.Fragile<T, Exception> resourceSource, org.dmfs.jems2.FragileProcedure<? super T, Exception> cleanUp) Constructor of aResourcethat does not need a separate context. -
Method Summary
-
Constructor Details
-
LazyResource
public LazyResource(org.dmfs.jems2.Fragile<T, Exception> resourceSource, org.dmfs.jems2.FragileProcedure<? super T, Exception> cleanUp) Constructor of aResourcethat does not need a separate context. -
LazyResource
public LazyResource(org.dmfs.jems2.Fragile<Context, Exception> contextSource, org.dmfs.jems2.FragileFunction<? super Context, ? extends T, Exception> contextToValueFunction, org.dmfs.jems2.FragileBiProcedure<? super T, ? super Context, Exception> cleanUp) Constructor of aResourcethat's created lazily from a given context. Use this constructor when more context than just the resource itself is needed to clean up after usage.
-
-
Method Details