Class Try.Failure<T>

java.lang.Object
io.reacted.patterns.Try<T>
io.reacted.patterns.Try.Failure<T>
Enclosing class:
Try<T>

public static final class Try.Failure<T>
extends Try<T>
  • Method Details

    • valueOf

      public static <T> Try.Failure<T> valueOf​(java.lang.Throwable failureValue)
    • get

      public T get()
      A failed Try does not hold any value
      Specified by:
      get in class Try<T>
      Returns:
      Nothing
      Throws:
      java.lang.UnsupportedOperationException - This operation is not allowed on a Failure
    • isSuccess

      public boolean isSuccess()
      Specified by:
      isSuccess in class Try<T>
      Returns:
      true if the operation has been successful. False otherwise
    • getCause

      public java.lang.Throwable getCause()
      Specified by:
      getCause in class Try<T>
      Returns:
      Return the cause of a failure