Package 

Object Try.Companion

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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 Throwable> 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
    • Constructor Detail

    • 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 Throwable> Try<Void, Failure> failure(Failure failure)

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