- failed(Throwable) - Static method in interface javascalautils.concurrent.Future
-
Creates a failed Future with the provided Throwable.
- failed() - Method in class javascalautils.Failure
-
- failed() - Method in class javascalautils.Success
-
- failed() - Method in interface javascalautils.Try
-
Completes this
Try with an exception wrapped in a
Success.
- failure(Throwable) - Method in interface javascalautils.concurrent.Promise
-
Completes the
Promise with an exception.
- Failure<T> - Class in javascalautils
-
Represents the
failure implementation of
Try.
- Failure(Throwable) - Constructor for class javascalautils.Failure
-
Creates a Failure for the provided Throwable.
- Failure(Throwable) - Static method in class javascalautils.TryCompanion
-
Creates an instance of
Failure wrapping the provided throwable.
- filter(Predicate<T>) - Method in interface javascalautils.concurrent.Future
-
Creates a new
Future that will filter the successful value of this instance once it is completed.
- filter(Predicate<T>) - Method in class javascalautils.Failure
-
Always returns this.
- filter(Predicate<L>) - Method in class javascalautils.LeftProjection
-
Returns a
Some wrapping the
Either if it's a
Left and the value of the
Left matches the predicate, else
None .
- filter(Predicate<T>) - Method in interface javascalautils.Option
-
Returns this Option if it is nonempty and applying the predicate p to this Option's value returns true.
- filter(Predicate<R>) - Method in class javascalautils.RightProjection
-
- filter(Predicate<T>) - Method in class javascalautils.Success
-
Applies the predicate to the value of this instance, if it matches
this is returned else a
Failure.
- filter(Predicate<T>) - Method in interface javascalautils.Try
-
Applies the predicate to the value of the
Try and either returns the Try if the predicate matched or a
Failure.
- filterNot(Predicate<T>) - Method in interface javascalautils.Option
-
Returns this Option if it is nonempty and applying the predicate p to this Option's value returns false.
- flatMap(ThrowableFunction1<T, Future<R>>) - Method in interface javascalautils.concurrent.Future
-
Creates a new
Future that will hold the mapped successful value of this instance once it is completed.
- flatMap(ThrowableFunction1<T, Try<R>>) - Method in class javascalautils.Failure
-
Always returns this.
- flatMap(Function<L, Left<T, R>>) - Method in class javascalautils.LeftProjection
-
If this projection contains a
Left then a new
Left is returned containing the value from the original
Right mapped via the
provided function, else the contained Either is returned as is.
- flatMap(Function<T, Option<R>>) - Method in class javascalautils.None
-
Always returns this.
- flatMap(Function<T, Option<R>>) - Method in interface javascalautils.Option
-
Returns an Option consisting of the result of applying the given function to the current
Some.
- flatMap(Function<R, Right<L, T>>) - Method in class javascalautils.RightProjection
-
If this projection contains a
Right then a new
Right is returned containing the value from the original
Right mapped via the
provided function, else the contained Either is returned as is.
- flatMap(Function<T, Option<R>>) - Method in class javascalautils.Some
-
Returns an Option consisting of the result of applying the given function to the current value.
- flatMap(ThrowableFunction1<T, Try<R>>) - Method in class javascalautils.Success
-
Applies the value to the function and returns the
Try generated by the function.
- flatMap(ThrowableFunction1<T, Try<R>>) - Method in interface javascalautils.Try
-
Maps the given function to the value from this
Success or returns
this if this is a
Failure.
- fold(Function<L, T>, Function<R, T>) - Method in interface javascalautils.Either
-
Applies
func_left if this is a
Left or
func_right if this is a
Right
- fold(Function<L, T>, Function<R, T>) - Method in class javascalautils.Left
-
Applies the provided func_left to the wrapped value and returns the result.
- fold(Function<L, T>, Function<R, T>) - Method in class javascalautils.Right
-
Applies the provided func_right to the wrapped value and returns the result.
- forAll(Predicate<L>) - Method in class javascalautils.LeftProjection
-
Returns
true if
Right or returns the result of applying the predicate to the
Left value.
- forall(Predicate<T>) - Method in interface javascalautils.Option
-
Returns true if the Option is nonempty and the predicate holds true, else false.
- forAll(Predicate<R>) - Method in class javascalautils.RightProjection
-
Returns
true if
Left or returns the result of applying the predicate to the
Right value.
- forEach(Consumer<T>) - Method in interface javascalautils.concurrent.Future
-
Asynchronously processes the value in the Future once it is available.
- fromTry(Try<T>) - Static method in interface javascalautils.concurrent.Future
-
Creates a completed Future with the provided Try.
- Future<T> - Interface in javascalautils.concurrent
-
A Future that will hold the result of an asynchronous computation.
- Future(VoidFunction0) - Static method in class javascalautils.concurrent.FutureCompanion
-
Allows for easy creation of asynchronous computations that will be executed in the future.
- Future(VoidFunction0, Executor) - Static method in class javascalautils.concurrent.FutureCompanion
-
Allows for easy creation of asynchronous computations that will be executed in the future.
- Future(ThrowableFunction0<T>) - Static method in class javascalautils.concurrent.FutureCompanion
-
Allows for easy creation of asynchronous computations that will be executed in the future.
- Future(ThrowableFunction0<T>, Executor) - Static method in class javascalautils.concurrent.FutureCompanion
-
Allows for easy creation of asynchronous computations that will be executed in the future.
- Future(Future<T>) - Static method in class javascalautils.concurrent.FutureCompanion
-
Allows for converting a blocking JDK
Future into a non-blocking future.
- Future(Future<T>, Executor) - Static method in class javascalautils.concurrent.FutureCompanion
-
Allows for converting a blocking JDK
Future into a non-blocking future.
- future() - Method in interface javascalautils.concurrent.Promise
-
Get a
Future that will hold the value once this Promise is completed.
- FutureCompanion - Class in javascalautils.concurrent
-
Acts as a Scala type companion object for
Future.