Try.ResultType
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
T |
get()
Returns value associated with successful completion or
NoSuchElementException if result represents a failure. |
java.lang.Throwable |
getError()
Returns
Throwable associated with this failure or
null if result represents successful completion. |
int |
hashCode() |
boolean |
isFailed() |
static <R> Try<R> |
of(java.lang.Throwable t) |
Try.ResultType |
resultType()
|
java.lang.String |
toString() |
public T get()
Try
NoSuchElementException
if result represents a failure.public java.lang.Throwable getError()
Try
Throwable
associated with this failure or
null if result represents successful completion.public Try.ResultType resultType()
Try
resultType
in interface Try<T>
public static <R> Try<R> of(java.lang.Throwable t)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object