T - component type of this Success@Deprecated public static final class Try.Success<T> extends Try<T> implements java.io.Serializable
Try.Failure<T>, Try.Success<T>, Try.WithResources1<T1 extends java.lang.AutoCloseable>, Try.WithResources2<T1 extends java.lang.AutoCloseable,T2 extends java.lang.AutoCloseable>, Try.WithResources3<T1 extends java.lang.AutoCloseable,T2 extends java.lang.AutoCloseable,T3 extends java.lang.AutoCloseable>, Try.WithResources4<T1 extends java.lang.AutoCloseable,T2 extends java.lang.AutoCloseable,T3 extends java.lang.AutoCloseable,T4 extends java.lang.AutoCloseable>, Try.WithResources5<T1 extends java.lang.AutoCloseable,T2 extends java.lang.AutoCloseable,T3 extends java.lang.AutoCloseable,T4 extends java.lang.AutoCloseable,T5 extends java.lang.AutoCloseable>, Try.WithResources6<T1 extends java.lang.AutoCloseable,T2 extends java.lang.AutoCloseable,T3 extends java.lang.AutoCloseable,T4 extends java.lang.AutoCloseable,T5 extends java.lang.AutoCloseable,T6 extends java.lang.AutoCloseable>, Try.WithResources7<T1 extends java.lang.AutoCloseable,T2 extends java.lang.AutoCloseable,T3 extends java.lang.AutoCloseable,T4 extends java.lang.AutoCloseable,T5 extends java.lang.AutoCloseable,T6 extends java.lang.AutoCloseable,T7 extends java.lang.AutoCloseable>, Try.WithResources8<T1 extends java.lang.AutoCloseable,T2 extends java.lang.AutoCloseable,T3 extends java.lang.AutoCloseable,T4 extends java.lang.AutoCloseable,T5 extends java.lang.AutoCloseable,T6 extends java.lang.AutoCloseable,T7 extends java.lang.AutoCloseable,T8 extends java.lang.AutoCloseable>| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Deprecated.
Clarifies that values have a proper equals() method implemented.
|
T |
get()
Deprecated.
Gets the result of this Try if this is a
Success or throws if this is a Failure. |
java.lang.Throwable |
getCause()
Deprecated.
Gets the cause if this is a Failure or throws if this is a Success.
|
int |
hashCode()
Deprecated.
Clarifies that values have a proper hashCode() method implemented.
|
boolean |
isEmpty()
Deprecated.
Checks whether this Try has no result, i.e.
|
boolean |
isFailure()
Deprecated.
Checks if this is a Failure.
|
boolean |
isSuccess()
Deprecated.
Checks if this is a Success.
|
java.lang.String |
stringPrefix()
Deprecated.
Returns the name of this Value type, which is used by toString().
|
java.lang.String |
toString()
Deprecated.
Clarifies that values have a proper toString() method implemented.
|
andFinally, andFinallyTry, andThen, andThen, andThenTry, andThenTry, collect, failed, failure, filter, filter, filter, filterNot, filterNot, filterNot, filterTry, filterTry, filterTry, flatMap, flatMapTry, fold, getOrElseGet, getOrElseThrow, isAsync, isLazy, isSingleValued, iterator, map, mapFailure, mapFailure, mapTry, narrow, of, ofCallable, ofSupplier, onFailure, onFailure, onSuccess, orElse, orElse, orElseRun, peek, peek, recover, recover, recover, recoverWith, recoverWith, recoverWith, run, runRunnable, sequence, success, toEither, toValidation, toValidation, transform, traverse, withResources, withResources, withResources, withResources, withResources, withResources, withResources, withResourcesclone, finalize, getClass, notify, notifyAll, wait, wait, waitcollect, collect, contains, corresponds, eq, exists, forAll, forEach, getOrElse, getOrElse, getOrElseThrow, getOrElseTry, getOrNull, narrow, out, out, spliterator, stderr, stdout, toArray, toCharSeq, toCompletableFuture, toEither, toEither, toInvalid, toInvalid, toJavaArray, toJavaArray, toJavaArray, toJavaCollection, toJavaList, toJavaList, toJavaMap, toJavaMap, toJavaMap, toJavaOptional, toJavaParallelStream, toJavaSet, toJavaSet, toJavaStream, toLeft, toLeft, toLinkedMap, toLinkedMap, toLinkedSet, toList, toMap, toMap, toOption, toPriorityQueue, toPriorityQueue, toQueue, toRight, toRight, toSet, toSortedMap, toSortedMap, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toStream, toTree, toTree, toTry, toTry, toValid, toValid, toValidation, toValidation, toVectorpublic T get()
TrySuccess or throws if this is a Failure.
IMPORTANT! If this is a Try.Failure, the underlying cause of type Throwable is thrown.
The thrown exception is exactly the same as the result of Try.getCause().
public java.lang.Throwable getCause()
Trypublic boolean isEmpty()
Trypublic boolean isFailure()
Trypublic boolean isSuccess()
Trypublic boolean equals(java.lang.Object obj)
Valuepublic int hashCode()
ValueSee Object.hashCode().
public java.lang.String stringPrefix()
ValuestringPrefix in interface Value<T>public java.lang.String toString()
ValueSee Object.toString().