Package 

Object Try.Companion

    • Method Summary

      Modifier and Type Method Description
      final <Success extends Any> Try<Success, Void> success(Success success) Returns an instance that encapsulates the given value as successful value.
      final <Failure extends Any> Try<Void, Failure> failure(Failure failure) Returns the encapsulated Throwable exception if this instance represents failure or null if it is success.
      • Methods inherited from class java.lang.Object

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

      • success

         final <Success extends Any> Try<Success, Void> success(Success success)

        Returns an instance that encapsulates the given value as successful value.

      • failure

         final <Failure extends Any> Try<Void, Failure> failure(Failure failure)

        Returns the encapsulated Throwable exception if this instance represents failure or null if it is success.