T
- component type of this Successpublic final class Success<T> extends Object implements Try<T>, Serializable
Try.CheckedConsumer<T>, Try.CheckedFunction<T,R>, Try.CheckedPredicate<T>, Try.CheckedRunnable, Try.CheckedSupplier<R>
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.
|
Failure.NonFatal |
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 |
toString()
Clarifies that values have a proper toString() method implemented.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
andThen, andThen, failed, filter, filterTry, flatMap, flatMapTry, flatten, iterator, map, mapTry, of, onFailure, onSuccess, orElseGet, orElseRun, orElseThrow, peek, recover, recoverWith, run, toEither
get, getOption, ifDefined, ifDefined, ifEmpty, ifEmpty, isDefined, orElse, orElseGet, orElseThrow, out, out, stderr, stdout, toArray, toCharSeq, toJavaArray, toJavaList, toJavaMap, toJavaOptional, toJavaSet, toJavaStream, toLazy, toList, toMap, toOption, toQueue, toSet, toStack, toStream, toTree, toTry, toVector
corresponds, eq, exists, forAll, forEach, grouped, sliding, sliding
spliterator
public Success(T value)
value
- The value of this Success.public T get()
Try
public Failure.NonFatal 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 toString()
Value
See Object.toString().
Copyright © 2015. All Rights Reserved.