Package io.vavr.control
Class Try.Success<T>
- java.lang.Object
-
- io.vavr.control.Try<T>
-
- io.vavr.control.Try.Success<T>
-
- Type Parameters:
T
- component type of this Success
@Deprecated public static final class Try.Success<T> extends Try<T> implements java.io.Serializable
Deprecated.will be removed from the public APIA succeeded Try.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.vavr.control.Try
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>
-
-
Method Summary
Modifier and Type Method 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 aSuccess
or throws if this is aFailure
.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.-
Methods inherited from class io.vavr.control.Try
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, mapTry, narrow, of, ofCallable, ofSupplier, onFailure, onFailure, onSuccess, orElse, orElse, orElseRun, peek, recover, recover, recover, recoverWith, recoverWith, recoverWith, run, runRunnable, sequence, success, toEither, toValidation, toValidation, transform, traverse, withResources, withResources, withResources, withResources, withResources, withResources, withResources, withResources
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.vavr.Value
collect, collect, contains, corresponds, eq, exists, forAll, forEach, getOrElse, getOrElse, getOrElseThrow, getOrElseTry, getOrNull, 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, toVector
-
-
-
-
Method Detail
-
get
public T get()
Deprecated.Description copied from class:Try
Gets the result of this Try if this is aSuccess
or throws if this is aFailure
.IMPORTANT! If this is a
Try.Failure
, the underlyingcause
of typeThrowable
is thrown.The thrown exception is exactly the same as the result of
Try.getCause()
.
-
getCause
public java.lang.Throwable getCause()
Deprecated.Description copied from class:Try
Gets the cause if this is a Failure or throws if this is a Success.
-
isEmpty
public boolean isEmpty()
Deprecated.Description copied from class:Try
Checks whether this Try has no result, i.e. is a Failure.
-
isFailure
public boolean isFailure()
Deprecated.Description copied from class:Try
Checks if this is a Failure.
-
isSuccess
public boolean isSuccess()
Deprecated.Description copied from class:Try
Checks if this is a Success.
-
equals
public boolean equals(java.lang.Object obj)
Deprecated.Description copied from interface:Value
Clarifies that values have a proper equals() method implemented.
-
hashCode
public int hashCode()
Deprecated.Description copied from interface:Value
Clarifies that values have a proper hashCode() method implemented.See Object.hashCode().
-
stringPrefix
public java.lang.String stringPrefix()
Deprecated.Description copied from interface:Value
Returns the name of this Value type, which is used by toString().- Specified by:
stringPrefix
in interfaceValue<T>
- Returns:
- This type name.
-
toString
public java.lang.String toString()
Deprecated.Description copied from interface:Value
Clarifies that values have a proper toString() method implemented.See Object.toString().
-
-