T
- component type of this Successpublic static final class Try.Success<T> extends Object implements Try<T>, Serializable
Try.CheckedConsumer<T>, Try.CheckedFunction<T,R>, Try.CheckedPredicate<T>, Try.CheckedRunnable, Try.CheckedSupplier<R>, Try.Failure<T>, Try.FatalException, Try.NonFatalException, Try.Success<T>
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Clarifies that values have a proper equals() method implemented.
|
T |
get()
Gets the result of this Try if this is a Success or throws if this is a Failure.
|
Throwable |
getCause()
Gets the cause if this is a Failure or throws if this is a Success.
|
int |
hashCode()
Clarifies that values have a proper hashCode() method implemented.
|
boolean |
isEmpty()
Checks whether this Try has no result, i.e.
|
boolean |
isFailure()
Checks if this is a Failure.
|
boolean |
isSuccess()
Checks if this is a Success.
|
String |
stringPrefix()
Returns the name of this Value type, which is used by toString().
|
String |
toString()
Clarifies that values have a proper toString() method implemented.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
andThen, andThen, andThenTry, andThenTry, failed, failure, filter, filterTry, flatMap, flatMapTry, getOrElseGet, getOrElseThrow, isSingleValued, iterator, map, mapTry, narrow, of, onFailure, onSuccess, orElse, orElse, orElseRun, peek, recover, recoverWith, run, sequence, success, toEither, transform
contains, corresponds, eq, exists, forAll, forEach, getOption, getOrElse, getOrElse, getOrElseThrow, getOrElseTry, narrow, out, out, stderr, stdout, toArray, toCharSeq, toJavaArray, toJavaArray, toJavaCollection, toJavaList, toJavaList, toJavaMap, toJavaMap, toJavaOptional, toJavaSet, toJavaSet, toJavaStream, toLeft, toLeft, toList, toMap, toOption, toQueue, toRight, toRight, toSet, toStack, toStream, toTree, toTry, toTry, toVector
spliterator
public T get()
Try
public Throwable getCause()
Try
public boolean isEmpty()
Try
public boolean isFailure()
Try
public boolean isSuccess()
Try
public boolean equals(Object obj)
Value
public int hashCode()
Value
See Object.hashCode().
public String stringPrefix()
Value
stringPrefix
in interface Value<T>
public String toString()
Value
See Object.toString().
Copyright © 2017. All Rights Reserved.