Package | Description |
---|---|
javascalautils |
Contains various utility classes translated from the Scala language.
|
javascalautils.concurrent |
Contains utilities for concurrent/asynchronous programming.
|
Modifier and Type | Method and Description |
---|---|
<R> Option<R> |
None.flatMap(ThrowableFunction1<T,Option<R>> function)
Always returns
this . |
<R> Option<R> |
Option.flatMap(ThrowableFunction1<T,Option<R>> function)
Returns an Option consisting of the result of applying the given function to the current
Some . |
<R> Option<R> |
Some.flatMap(ThrowableFunction1<T,Option<R>> function)
Returns an Option consisting of the result of applying the given function to the current value.
|
<R> Try<R> |
Success.flatMap(ThrowableFunction1<T,Try<R>> function)
Applies the value to the function and returns the
Try generated by the function. |
<R> Try<R> |
Failure.flatMap(ThrowableFunction1<T,Try<R>> function)
Always returns this.
|
<R> Try<R> |
Try.flatMap(ThrowableFunction1<T,Try<R>> function)
|
<R> Try<R> |
Success.map(ThrowableFunction1<T,R> function)
Applies the value to the function and returns the
Try representing the mapped value. |
<R> Try<R> |
Failure.map(ThrowableFunction1<T,R> function)
Always returns this.
|
<R> Try<R> |
Try.map(ThrowableFunction1<T,R> function)
|
<R> Option<R> |
None.map(ThrowableFunction1<T,R> function)
Always returns
this . |
<R> Option<R> |
Option.map(ThrowableFunction1<T,R> function)
Returns an Option consisting of the result of applying the given function to the current
Some . |
<R> Option<R> |
Some.map(ThrowableFunction1<T,R> f)
Returns an
Option containing the value of applying the given function to the current value. |
Try<T> |
Success.recover(ThrowableFunction1<Throwable,T> function)
Always returns this .
|
Try<T> |
Failure.recover(ThrowableFunction1<Throwable,T> function)
|
Try<T> |
Try.recover(ThrowableFunction1<Throwable,T> function)
|
Try<T> |
Success.recoverWith(ThrowableFunction1<Throwable,Try<T>> function)
Always returns this .
|
Try<T> |
Failure.recoverWith(ThrowableFunction1<Throwable,Try<T>> function)
Applies the provided function to the Throwable of this
Failure and returns the result. |
Try<T> |
Try.recoverWith(ThrowableFunction1<Throwable,Try<T>> function)
|
Modifier and Type | Method and Description |
---|---|
<R> Future<R> |
Future.flatMap(ThrowableFunction1<T,Future<R>> function)
Creates a new
Future that will hold the mapped successful value of this instance once it is completed. |
<R> Future<R> |
Future.map(ThrowableFunction1<T,R> function)
Creates a new
Future that will hold the mapped successful value of this instance once it is completed. |
Future<T> |
Future.recover(ThrowableFunction1<Throwable,T> recoverFunction)
|
<R> Future<R> |
Future.transform(ThrowableFunction1<T,R> onSuccess,
ThrowableFunction1<Throwable,Throwable> onFailure)
Creates a new
Future that will hold the transformed successful value of this instance once it is completed. |
<R> Future<R> |
Future.transform(ThrowableFunction1<T,R> onSuccess,
ThrowableFunction1<Throwable,Throwable> onFailure)
Creates a new
Future that will hold the transformed successful value of this instance once it is completed. |
Copyright © 2016, Peter Nerg Apache License v2.0