/** * Creates a {@code Try}-with-resources builder that operates on three {@link AutoCloseable} resources. * * @param t1Supplier The supplier of the 1st resource. * @param t2Supplier The supplier of the 2nd resource. * @param t3Supplier The supplier of the 3rd resource. * @param <T1> Type of the 1st resource. * @param <T2> Type of the 2nd resource. * @param <T3> Type of the 3rd resource. * @return a new {@link WithResources3} instance. */ static <T1 extends AutoCloseable, T2 extends AutoCloseable, T3 extends AutoCloseable> WithResources3<T1, T2, T3> withResources(CheckedFunction0<? extends T1> t1Supplier, CheckedFunction0<? extends T2> t2Supplier, CheckedFunction0<? extends T3> t3Supplier) { return new WithResources3<>(t1Supplier, t2Supplier, t3Supplier); }
/** * Creates a {@code Try}-with-resources builder that operates on three {@link AutoCloseable} resources. * * @param t1Supplier The supplier of the 1st resource. * @param t2Supplier The supplier of the 2nd resource. * @param t3Supplier The supplier of the 3rd resource. * @param <T1> Type of the 1st resource. * @param <T2> Type of the 2nd resource. * @param <T3> Type of the 3rd resource. * @return a new {@link WithResources3} instance. */ static <T1 extends AutoCloseable, T2 extends AutoCloseable, T3 extends AutoCloseable> WithResources3<T1, T2, T3> withResources(CheckedFunction0<? extends T1> t1Supplier, CheckedFunction0<? extends T2> t2Supplier, CheckedFunction0<? extends T3> t3Supplier) { return new WithResources3<>(t1Supplier, t2Supplier, t3Supplier); }