Class Try.WithResources4<T1 extends java.lang.AutoCloseable,​T2 extends java.lang.AutoCloseable,​T3 extends java.lang.AutoCloseable,​T4 extends java.lang.AutoCloseable>

  • Type Parameters:
    T1 - Type of the 1st resource.
    T2 - Type of the 2nd resource.
    T3 - Type of the 3rd resource.
    T4 - Type of the 4th resource.
    Enclosing class:
    Try<T>

    public static final class Try.WithResources4<T1 extends java.lang.AutoCloseable,​T2 extends java.lang.AutoCloseable,​T3 extends java.lang.AutoCloseable,​T4 extends java.lang.AutoCloseable>
    extends java.lang.Object
    A Try-with-resources builder that operates on four AutoCloseable resources.
    • Method Summary

      Modifier and Type Method Description
      <R> Try<R> of​(CheckedFunction4<? super T1,​? super T2,​? super T3,​? super T4,​? extends R> f)
      Wraps the result of a computation that may fail in a Try.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • of

        public <R> Try<R> of​(CheckedFunction4<? super T1,​? super T2,​? super T3,​? super T4,​? extends R> f)
        Wraps the result of a computation that may fail in a Try.
        Type Parameters:
        R - Result type of the computation.
        Parameters:
        f - A computation that takes four AutoClosable resources.
        Returns:
        A new Try instance.