A B C D E F G H I J L M N O P R S T U V
All Classes All Packages
All Classes All Packages
All Classes All Packages
A
- apply() - Static method in interface javascalautils.concurrent.Promise
-
Creates an instance of Promise.
- apply() - Method in interface javascalautils.ThrowableFunction0
-
Applies this function returning a result.
- apply() - Method in interface javascalautils.VoidFunction0
-
Applies this function.
- apply(ThrowableFunction0<T>) - Static method in interface javascalautils.concurrent.Future
-
Allows for easy creation of asynchronous computations that will be executed in the future.
- apply(ThrowableFunction0<T>) - Static method in interface javascalautils.Try
-
Creates an instance of Try wrapping the result of the provided function.
- apply(ThrowableFunction0<T>, Executor) - Static method in interface javascalautils.concurrent.Future
-
Allows for easy creation of asynchronous computations that will be executed in the future.
- apply(T) - Static method in interface javascalautils.Option
-
Creates an instance of Option.
- apply(T) - Method in interface javascalautils.ThrowableFunction1
-
Applies this function returning a result.
- apply(T) - Static method in interface javascalautils.Try
-
Creates an instance of Try.
- asOption() - Method in interface javascalautils.Try
- asOptional() - Method in interface javascalautils.Option
-
Converts this
Option
to a correspondingOptional
. - awaitTermination(long, TimeUnit) - Method in interface javascalautils.concurrent.Executor
-
Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first.
B
- BrokenFunctionException - Exception in javascalautils
-
Used when a function throws an exception which cannot be raised.
- BrokenFunctionException(String, Throwable) - Constructor for exception javascalautils.BrokenFunctionException
-
Creates the exception
C
- complete(Try<T>) - Method in interface javascalautils.concurrent.Promise
- completeWith(Future<T>) - Method in interface javascalautils.concurrent.Promise
- contains(T) - Method in interface javascalautils.Option
- count() - Method in interface javascalautils.Option
-
Returns the count which means
1
for nonempty Option's and0
for empty. - create() - Method in interface javascalautils.concurrent.ExecutorProvider
-
Used to create the default
Executor
instance. - create(Executor) - Static method in class javascalautils.concurrent.Executors
-
Creates an executor that uses the provided Java concurrent executor for the actual job processing
- createCachedThreadPoolExecutor(ThreadFactory) - Static method in class javascalautils.concurrent.Executors
-
Creates an executor that uses the
Executors.newCachedThreadPool(ThreadFactory)
. - createFixedThreadPoolExecutor(int, ThreadFactory) - Static method in class javascalautils.concurrent.Executors
-
Creates an executor that uses the
Executors.newFixedThreadPool(int,ThreadFactory)
D
- DEFAULT_NONE - Static variable in interface javascalautils.Option
-
This is a singleton
None
since it anyways cannot represent a state.
E
- Either<L,R> - Interface in javascalautils
-
Represents a value of one of two possible types.
- EitherCompanion - Class in javascalautils
- empty() - Static method in interface javascalautils.Option
-
Returns an empty Option.
- equals(Object) - Method in class javascalautils.None
- equals(Object) - Method in class javascalautils.Some
- equals(Object) - Method in class javascalautils.Unit
-
Simply compares the provided object to see if it is an instance of
Unit
. - Executable<T> - Interface in javascalautils.concurrent
-
A task that returns either a successful or failed result.
- execute(Callable<T>) - Method in interface javascalautils.concurrent.Executor
-
Executes the provided
Callable
sometime in the future. - execute(Executable<T>) - Method in interface javascalautils.concurrent.Executor
-
Executes the provided
Executable
sometime in the future. - execute(Promise<T>) - Method in interface javascalautils.concurrent.Executable
-
Execute the job.
- executeAll(Callable<T>...) - Method in interface javascalautils.concurrent.Executor
-
Executes the list of provided
Callable
sometime in the future. - executeAll(Executable<T>...) - Method in interface javascalautils.concurrent.Executor
-
Executes the list of provided
Executable
sometime in the future. - Executor - Interface in javascalautils.concurrent
-
Executor service used to execute work in asynchronous fashion.
- ExecutorProvider - Interface in javascalautils.concurrent
-
Allows for creating a custom
Executor
forExecutors.getDefault()
. - ExecutorProviderClass - Static variable in class javascalautils.concurrent.Executors
- Executors - Class in javascalautils.concurrent
-
Factory for creating
Executor
instances. - exists(Predicate<L>) - Method in class javascalautils.LeftProjection
- exists(Predicate<R>) - Method in class javascalautils.RightProjection
- exists(Predicate<T>) - Method in class javascalautils.None
-
Always returns
false
. - exists(Predicate<T>) - Method in interface javascalautils.Option
-
Returns
true
if this option is nonempty and the predicate p returnstrue
when applied to this Option's value. - exists(Predicate<T>) - Method in class javascalautils.Some
-
Returns
true
if the predicate matches the value.
F
- failed() - Method in class javascalautils.Failure
-
Returns a
Success
with theThrowable
this instance represents. - failed() - Method in class javascalautils.Success
-
Returns a
Failure
with anUnsupportedOperationException
. - failed() - Method in interface javascalautils.Try
-
Completes this Try with an exception wrapped in a
Success
. - failed(Throwable) - Static method in interface javascalautils.concurrent.Future
-
Creates a failed Future with the provided Throwable.
- 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<L>) - Method in class javascalautils.LeftProjection
- filter(Predicate<R>) - Method in class javascalautils.RightProjection
- 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<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<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
- 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(Function<L, Left<T, R>>) - Method in class javascalautils.LeftProjection
- flatMap(Function<R, Right<L, T>>) - Method in class javascalautils.RightProjection
- 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, Option<R>>) - Method in class javascalautils.None
-
Always returns
this
. - flatMap(ThrowableFunction1<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(ThrowableFunction1<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.Failure
-
Always returns this.
- 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
- fold(Function<L, T>, Function<R, T>) - Method in interface javascalautils.Either
- 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<T>) - Method in interface javascalautils.Option
-
Returns
true
if the Option is nonempty and the predicate holdstrue
, elsefalse
. - forAll(Predicate<L>) - Method in class javascalautils.LeftProjection
- forAll(Predicate<R>) - Method in class javascalautils.RightProjection
- 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() - Method in interface javascalautils.concurrent.Promise
-
Get a
Future
that will hold the value once this Promise is completed. - Future<T> - Interface in javascalautils.concurrent
-
A Future that will hold the result of an asynchronous computation.
- 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(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(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.
- FutureCompanion - Class in javascalautils.concurrent
-
Acts as a Scala type companion object for
Future
.
G
- get() - Method in class javascalautils.Failure
-
Always throws the
Throwable
this instance represents. - get() - Method in class javascalautils.None
-
Always throws
NoSuchElementException
since None cannot per definition hold any value. - get() - Method in interface javascalautils.Option
-
Returns this Option's value if such exists, else
NoSuchElementException
is raised. - get() - Method in class javascalautils.Some
-
Always returns the value for this instance.
- get() - Method in class javascalautils.Success
-
Returns the value held by this instance.
- get() - Method in interface javascalautils.Try
- getDefault() - Static method in class javascalautils.concurrent.Executors
-
Get the default thread executor.
- getOrElse(Supplier<L>) - Method in class javascalautils.LeftProjection
-
Returns the value if this is a
Left
else the value provided by the supplier. - getOrElse(Supplier<R>) - Method in class javascalautils.RightProjection
-
Returns the value if this is a
Right
else the value provided by the supplier. - getOrElse(Supplier<T>) - Method in class javascalautils.Failure
-
Always returns the value provided by the supplier.
- getOrElse(Supplier<T>) - Method in class javascalautils.None
-
Always the value provided by the supplier.
- getOrElse(Supplier<T>) - Method in interface javascalautils.Option
-
Returns this Option's value if such exists, else the value provided by the supplier.
- getOrElse(Supplier<T>) - Method in class javascalautils.Some
-
Always returns the value for this instance.
- getOrElse(Supplier<T>) - Method in class javascalautils.Success
-
Returns the value provided in the constructor.
- getOrElse(Supplier<T>) - Method in interface javascalautils.Try
H
- hashCode() - Method in class javascalautils.None
-
Always returns
0
as None is stateless and has no value. - hashCode() - Method in class javascalautils.Some
-
Returns the hashCode based on the value of this instance.
- hashCode() - Method in class javascalautils.Unit
-
Always returns
69
.
I
- Instance - Static variable in class javascalautils.Unit
-
Static singleton representing the Unit.
- isCompleted() - Method in interface javascalautils.concurrent.Future
-
Check if this Future is completed, with a value or an exception.
- isCompleted() - Method in interface javascalautils.concurrent.Promise
-
Check if the
Promise
have been completed, with a value or an exception. - isDefined() - Method in interface javascalautils.Option
- isEmpty() - Method in interface javascalautils.Option
- isFailure() - Method in interface javascalautils.Try
- isLeft() - Method in interface javascalautils.Either
- isRight() - Method in interface javascalautils.Either
- isRight() - Method in class javascalautils.Left
-
Always returns
false
. - isRight() - Method in class javascalautils.Right
-
Always returns
true
. - isSuccess() - Method in class javascalautils.Failure
-
Always returns
false
. - isSuccess() - Method in class javascalautils.Success
-
Always returns
true
. - isSuccess() - Method in interface javascalautils.Try
- iterator() - Method in interface javascalautils.Option
-
Returns the Option's value in an
Iterator
if it is nonempty, or an emptyIterator
if it is empty. - iterator() - Method in interface javascalautils.Try
J
- javascalautils - package javascalautils
-
Contains various utility classes translated from the Scala language.
- javascalautils.concurrent - package javascalautils.concurrent
-
Contains utilities for concurrent/asynchronous programming.
L
- left() - Method in interface javascalautils.Either
-
Returns a
LeftProjection
for this instance. - Left<L,R> - Class in javascalautils
- Left(L) - Constructor for class javascalautils.Left
-
Creates an instance wrapping the provide value.
- Left(L) - Static method in class javascalautils.EitherCompanion
-
Creates an instance of
Left
. - LeftProjection<L,R> - Class in javascalautils
-
This is a left-biased wrapper for an instance of
Either
.
M
- map(Function<L, T>) - Method in class javascalautils.LeftProjection
- map(Function<R, T>) - Method in class javascalautils.RightProjection
- map(ThrowableFunction1<T, 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. - map(ThrowableFunction1<T, R>) - Method in class javascalautils.Failure
-
Always returns this.
- map(ThrowableFunction1<T, R>) - Method in class javascalautils.None
-
Always returns
this
. - map(ThrowableFunction1<T, R>) - Method in interface javascalautils.Option
-
Returns an Option consisting of the result of applying the given function to the current
Some
. - map(ThrowableFunction1<T, R>) - Method in class javascalautils.Some
-
Returns an
Option
containing the value of applying the given function to the current value. - map(ThrowableFunction1<T, R>) - Method in class javascalautils.Success
-
Applies the value to the function and returns the
Try
representing the mapped value. - map(ThrowableFunction1<T, R>) - Method in interface javascalautils.Try
N
- NamedSequenceThreadFactory - Class in javascalautils.concurrent
-
Thread factory for providing meaningful names to the created threads.
- NamedSequenceThreadFactory(String) - Constructor for class javascalautils.concurrent.NamedSequenceThreadFactory
-
Create the factory.
- newThread(Runnable) - Method in class javascalautils.concurrent.NamedSequenceThreadFactory
-
Creates a new thread using the provided name and sequence counter.
- None<T> - Class in javascalautils
-
Represents an empty
Option
. - None() - Constructor for class javascalautils.None
- None() - Static method in interface javascalautils.Option
-
Returns an empty Option.
- None() - Static method in class javascalautils.OptionCompanion
-
Returns an instance of
None
.
O
- ofOptional(Optional<T>) - Static method in interface javascalautils.Option
-
Converts the
Optional
to a correspondingOption
. - onComplete(Consumer<Try<T>>) - Method in interface javascalautils.concurrent.Future
-
Register a handler to be invoked if the Future gets completed with a value or a failure.
- onFailure(Consumer<Throwable>) - Method in interface javascalautils.concurrent.Future
-
Register a handler to be invoked if the Future gets completed with an exception.
- onSuccess(Consumer<T>) - Method in interface javascalautils.concurrent.Future
-
Register a handler to be invoked if the Future gets completed with a value.
- Option<T> - Interface in javascalautils
-
Represents optional values.
- Option(T) - Static method in class javascalautils.OptionCompanion
-
Creates an instance of Option.
- OptionCompanion - Class in javascalautils
- orElse(Supplier<Option<T>>) - Method in class javascalautils.None
-
Always the value provided by the supplier.
- orElse(Supplier<Option<T>>) - Method in interface javascalautils.Option
-
Returns this Option if it is nonempty, otherwise return the result of provided by the supplier.
- orElse(Supplier<Option<T>>) - Method in class javascalautils.Some
-
Always returns this.
- orElse(Supplier<Try<T>>) - Method in class javascalautils.Failure
-
Always returns the value provided by the supplier.
- orElse(Supplier<Try<T>>) - Method in class javascalautils.Success
-
Always returns this.
- orElse(Supplier<Try<T>>) - Method in interface javascalautils.Try
- orNull() - Method in interface javascalautils.Option
-
Returns the Option's value if it is nonempty, or
null
if it is empty. - orNull() - Method in interface javascalautils.Try
-
Returns the value if it is a
Success
, elsenull
.
P
- Promise<T> - Interface in javascalautils.concurrent
-
The Promise is the promise to deliver a value at some time in the future.
- Promise() - Static method in class javascalautils.concurrent.PromiseCompanion
-
Creates an instance of Promise.
- PromiseCompanion - Class in javascalautils.concurrent
-
Acts as a Scala type companion object for
Promise
.
R
- ready(long, TimeUnit) - Method in interface javascalautils.concurrent.Future
-
Blocks and waits for this Future to complete.
- ready(Duration) - Method in interface javascalautils.concurrent.Future
-
Blocks and waits for this Future to complete.
- recover(ThrowableFunction1<Throwable, T>) - Method in interface javascalautils.concurrent.Future
- recover(ThrowableFunction1<Throwable, T>) - Method in class javascalautils.Failure
- recover(ThrowableFunction1<Throwable, T>) - Method in class javascalautils.Success
-
Always returns this .
- recover(ThrowableFunction1<Throwable, T>) - Method in interface javascalautils.Try
- recoverWith(ThrowableFunction1<Throwable, Try<T>>) - Method in class javascalautils.Failure
-
Applies the provided function to the Throwable of this
Failure
and returns the result. - recoverWith(ThrowableFunction1<Throwable, Try<T>>) - Method in class javascalautils.Success
-
Always returns this .
- recoverWith(ThrowableFunction1<Throwable, Try<T>>) - Method in interface javascalautils.Try
- requireNonNull(T) - Static method in class javascalautils.Validator
-
Checks that the specified object reference is not
null
and and throwsIllegalArgumentException
if it is. - requireNonNull(T, String) - Static method in class javascalautils.Validator
-
Checks that the specified object reference is not
null
and throws a customizedIllegalArgumentException
if it is. - result(long, TimeUnit) - Method in interface javascalautils.concurrent.Future
-
Blocks and waits for this Future to complete.
- result(Duration) - Method in interface javascalautils.concurrent.Future
-
Blocks and waits for this Future to complete.
- right() - Method in interface javascalautils.Either
-
Returns a
RightProjection
for this instance. - Right<L,R> - Class in javascalautils
- Right(R) - Constructor for class javascalautils.Right
-
Creates an instance wrapping the provide value.
- Right(R) - Static method in class javascalautils.EitherCompanion
-
Creates an instance of
Right
. - RightProjection<L,R> - Class in javascalautils
-
This is a right-biased wrapper for an instance of
Either
.
S
- sequence(Stream<Future<T>>) - Static method in interface javascalautils.concurrent.Future
-
Turns a Stream of Futures into a single Future containing a Stream with all the results from the Futures.
- shutdown() - Method in interface javascalautils.concurrent.Executor
-
Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted.
- Some<T> - Class in javascalautils
-
Represents an
Option
holding a value. - Some(T) - Constructor for class javascalautils.Some
-
Creates an instance for the provided value.
- Some(T) - Static method in class javascalautils.OptionCompanion
-
Creates an instance of
Some
. - stream() - Method in interface javascalautils.Option
-
Returns the Option's value in a Stream if it is nonempty, or an empty Stream if it is empty.
- stream() - Method in interface javascalautils.Try
- success(T) - Method in interface javascalautils.concurrent.Promise
-
Completes the
Promise
with a value. - Success<T> - Class in javascalautils
-
Represents the successful implementation of
Try
. - Success(T) - Constructor for class javascalautils.Success
-
Creates a 'successful' instance with the provided value.
- Success(T) - Static method in class javascalautils.TryCompanion
-
Creates an instance of
Success
wrapping the provided value. - successful(T) - Static method in interface javascalautils.concurrent.Future
-
Creates a successful Future with the provided value.
- swap() - Method in interface javascalautils.Either
- swap() - Method in class javascalautils.Left
-
Returns a
Right
containing the value for this instance. - swap() - Method in class javascalautils.Right
-
Returns a
Left
containing the value for this instance.
T
- ThrowableFunction0<T> - Interface in javascalautils
-
A function that takes no arguments and returns a value of type T.
- ThrowableFunction1<T,R> - Interface in javascalautils
-
A function that takes a single argument of type R and returns a value of type T.
- toLeft(Supplier<R>) - Method in class javascalautils.None
-
Returns a
Right
containing the value from the provided supplier. - toLeft(Supplier<R>) - Method in interface javascalautils.Option
- toLeft(Supplier<R>) - Method in class javascalautils.Some
-
Returns a
Left
containing the value of this instance. - toRight(Supplier<L>) - Method in class javascalautils.None
-
Returns a
Left
containing the value from the provided supplier. - toRight(Supplier<L>) - Method in interface javascalautils.Option
- toRight(Supplier<L>) - Method in class javascalautils.Some
-
Returns a
Right
containing the value of this instance. - toString() - Method in class javascalautils.Failure
-
Returns a String representation of the instance.
- toString() - Method in class javascalautils.Left
-
Returns a String representation of the instance.
- toString() - Method in class javascalautils.None
-
Returns a String representation of the instance.
- toString() - Method in class javascalautils.Right
-
Returns a String representation of the instance.
- toString() - Method in class javascalautils.Some
-
Returns a String representation of the instance.
- toString() - Method in class javascalautils.Success
-
Returns a String representation of the instance.
- toString() - Method in class javascalautils.Unit
-
Always returns the string
Unit
- transform(ThrowableFunction1<T, R>, ThrowableFunction1<Throwable, Throwable>) - Method in interface javascalautils.concurrent.Future
-
Creates a new
Future
that will hold the transformed successful value of this instance once it is completed. - traverse(Stream<T>, Function<T, Future<R>>) - Static method in interface javascalautils.concurrent.Future
-
Takes a Stream of values and applies the provided function to them in parallel resulting in a Future containing a Stream with the mapped values.
- Try<T> - Interface in javascalautils
-
The Try type represents a computation that may either result in an exception, or return a successfully computed value.
- Try(ThrowableFunction0<T>) - Static method in class javascalautils.TryCompanion
-
Creates an instance of
Try
wrapping the result of the provided function. - Try(VoidFunction0) - Static method in class javascalautils.TryCompanion
- TryCompanion - Class in javascalautils
- tryComplete(Try<T>) - Method in interface javascalautils.concurrent.Promise
- tryCompleteWith(Future<T>) - Method in interface javascalautils.concurrent.Promise
- tryFailure(Throwable) - Method in interface javascalautils.concurrent.Promise
-
Tries to complete the
Promise
with an exception. - trySuccess(T) - Method in interface javascalautils.concurrent.Promise
-
Tries to complete the
Promise
with a value.
U
- Unit - Class in javascalautils
-
Represents the type scala.Unit.
- Unit() - Constructor for class javascalautils.Unit
V
- Validator - Class in javascalautils
-
Used internally to validate parameters
- value() - Method in interface javascalautils.concurrent.Future
-
The current (completed or not) value of the future.
- VoidFunction0 - Interface in javascalautils
-
A FunctionalInterface that takes no parameters and has no return but is allowed to throw exceptions.
All Classes All Packages