Try.Companion, Try.Failure<A>, Try.Success<A>
Constructor and Description |
---|
Failure(java.lang.Throwable exception) |
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
component1() |
Try.Failure<A> |
copy(java.lang.Throwable exception) |
boolean |
equals(java.lang.Object p) |
java.lang.Throwable |
getException() |
A |
getOrThrow()
Returns the value if a
class Try.Success otherwise throws the exception if a class Try.Failure . |
int |
hashCode() |
boolean |
isFailure()
|
boolean |
isSuccess()
|
java.lang.String |
toString() |
combine, doOnFailure, doOnSuccess, flatMap, getOrThrow, isFailure, isSuccess, map, throwError
public boolean isSuccess()
Returns true
iff the class Try
is a class Try.Failure
.
class Try
,
class Try.Failure
public boolean isFailure()
Returns true
iff the class Try
is a class Try.Success
.
class Try
,
class Try.Success
public A getOrThrow()
Returns the value if a class Try.Success
otherwise throws the exception if a class Try.Failure
.
class Try.Success
,
class Try.Failure
public java.lang.String toString()
public java.lang.Throwable getException()
public java.lang.Throwable component1()
public Try.Failure<A> copy(java.lang.Throwable exception)
public int hashCode()
public boolean equals(java.lang.Object p)