Package com.jnape.palatable.lambda.adt
Class Try.Success<A>
java.lang.Object
com.jnape.palatable.lambda.adt.Try<A>
com.jnape.palatable.lambda.adt.Try.Success<A>
- All Implemented Interfaces:
CoProduct2<Throwable,
,A, Try<A>> Applicative<A,
,Try<?>> Functor<A,
,Try<?>> Monad<A,
,Try<?>> MonadError<Throwable,
,A, Try<?>> MonadRec<A,
,Try<?>> Traversable<A,
Try<?>>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.jnape.palatable.lambda.adt.Try
catchError, catching, catching, discardL, discardR, ensuring, failure, flatMap, fmap, forfeit, lazyZip, orThrow, pure, pureTry, recover, success, throwError, toEither, toEither, toMaybe, trampolineM, traverse, trying, trying, withResources, withResources, withResources, zip
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
a
-
-
Constructor Details
-
Success
-
-
Method Details
-
orThrow
Description copied from class:Try
If this is a success value, return it. Otherwise, transform the captured failure withfn
and throw the result. -
match
Description copied from interface:CoProduct2
Type-safe convergence requiring a match against all potential types.- Type Parameters:
R
- result type- Parameters:
aFn
- morphismA -> R
bFn
- morphismB -> R
- Returns:
- the result of applying the appropriate morphism to this coproduct's unwrapped value
-
equals
-
hashCode
public int hashCode() -
toString
-