Skip navigation links
A C D E F G H I J L M N O P R S T V 

A

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>, Executor) - Static method in interface javascalautils.concurrent.Future
Allows for easy creation of asynchronous computations that will be executed in the future.
apply() - Static method in interface javascalautils.concurrent.Promise
Creates an instance of Promise.
apply(T) - Static method in interface javascalautils.Option
Creates an instance of Option.
apply() - Method in interface javascalautils.ThrowableFunction0
Applies this function returning a result.
apply(T) - Static method in interface javascalautils.Try
Creates an instance of Try.
apply(ThrowableFunction0<T>) - Static method in interface javascalautils.Try
Creates an instance of Try wrapping the result of the provided function.
asOption() - Method in interface javascalautils.Try
Returns this Try as an Option.
asOptional() - Method in interface javascalautils.Option
Converts this Option to a corresponding Optional.
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.

C

complete(Try<T>) - Method in interface javascalautils.concurrent.Promise
Completes the Promise with either a Success or a Failure.
completeWith(Future<T>) - Method in interface javascalautils.concurrent.Promise
Completes the Promise with the value from the provided Future once that is completed.
contains(T) - Method in interface javascalautils.Option
Returns true if this is a Some containing the provided object, else false.
count() - Method in interface javascalautils.Option
Returns the count which means 1 for nonempty Option's and 0 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
Acts as a Scala type companion object for Left/Right.
empty() - Static method in interface javascalautils.Option
Returns an empty Option.
equals(Object) - Method in class javascalautils.None
Returns true if other is a None as None is stateless comparing it to some other None is therefore always the same, false otherwise.
equals(Object) - Method in class javascalautils.Some
Returns true if the other object is Some containing a value that equals the value of this Some, else false.
Executable<T> - Interface in javascalautils.concurrent
A task that returns either a successful or failed result.
execute(Promise<T>) - Method in interface javascalautils.concurrent.Executable
Execute the job.
execute(Executable<T>) - Method in interface javascalautils.concurrent.Executor
Executes the provided Executable sometime in the future.
execute(Callable<T>) - Method in interface javascalautils.concurrent.Executor
Executes the 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.
executeAll(Callable<T>...) - Method in interface javascalautils.concurrent.Executor
Executes the list of provided Callable 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 for Executors.getDefault().
Executors - Class in javascalautils.concurrent
Factory for creating Executor instances.
exists(Predicate<L>) - Method in class javascalautils.LeftProjection
Returns false if Right or returns the result of applying the predicate to the Left value.
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 returns true when applied to this Option's value.
exists(Predicate<R>) - Method in class javascalautils.RightProjection
Returns false if Left or returns the result of applying the predicate to the Right value.
exists(Predicate<T>) - Method in class javascalautils.Some
Returns true if the predicate matches the value.

F

failed(Throwable) - Static method in interface javascalautils.concurrent.Future
Creates a failed Future with the provided Throwable.
failed() - Method in class javascalautils.Failure
Returns a Success with the Throwable this instance represents.
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
Returns a Some wrapping the Either if it's a Right and the value of the Right matches the predicate, else None .
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(Function<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(Function<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(Function<T, Try<R>>) - Method in class javascalautils.Success
Applies the value to the function and returns the Try generated by the function.
flatMap(Function<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(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.

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
Returns the value from this Success or throws the exception if this is a Failure.
getDefault() - Static method in class javascalautils.concurrent.Executors
Get the default thread executor.
getOrElse(Supplier<T>) - Method in class javascalautils.Failure
Always returns the value provided by the supplier.
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<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<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.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
Returns the value from this Success or the value provided by the supplier if this is a Failure.

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.

I

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
Returns true if the option is an instance of Some, false otherwise.
isEmpty() - Method in interface javascalautils.Option
Returns true if the option is an instance of None, false otherwise
isFailure() - Method in interface javascalautils.Try
Returns true if the Try is a Failure, false otherwise.
isLeft() - Method in interface javascalautils.Either
Returnstrue if this instance is Left, else false
isRight() - Method in interface javascalautils.Either
Returnstrue if this instance is Right, else false.
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
Returns true if the Try is a Success, false otherwise.
iterator() - Method in interface javascalautils.Option
Returns the Option's value in an Iterator if it is nonempty, or an empty Iterator if it is empty.
iterator() - Method in interface javascalautils.Try
Returns the Try's value in an Iterator if it is a Success, or an empty Iterator if it is Failure.

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) - Static method in class javascalautils.EitherCompanion
Creates an instance of Left.
Left<L,R> - Class in javascalautils
Represents the Left side of an Either.
Left(L) - Constructor for class javascalautils.Left
Creates an instance wrapping the provide value.
LeftProjection<L,R> - Class in javascalautils
This is a left-biased wrapper for an instance of Either.

M

map(Function<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(Function<T, R>) - Method in class javascalautils.Failure
Always returns this.
map(Function<L, T>) - 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.
map(Function<T, R>) - Method in class javascalautils.None
Always returns this.
map(Function<T, R>) - Method in interface javascalautils.Option
Returns an Option consisting of the result of applying the given function to the current Some.
map(Function<R, 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.
map(Function<T, R>) - Method in class javascalautils.Some
Returns an Option containing the value of applying the given function to the current value.
map(Function<T, R>) - Method in class javascalautils.Success
Applies the value to the function and returns the Try representing the mapped value.
map(Function<T, R>) - Method in interface javascalautils.Try
Maps the given function to the value from this Success or returns this if this is a Failure.

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 corresponding Option.
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
Acts as a Scala type companion object for Option/Some/None.
orElse(Supplier<Try<T>>) - Method in class javascalautils.Failure
Always returns the value provided by the supplier.
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.Success
Always returns this.
orElse(Supplier<Try<T>>) - Method in interface javascalautils.Try
Returns this Try if it's a Success or the value provided by the supplier if this is a Failure.
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, else null.

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

recover(Function<Throwable, T>) - Method in interface javascalautils.concurrent.Future
Creates a new Future that in case this Future is a 'failure' will apply the function to recover the 'failure' to a 'success'.
recover(Function<Throwable, T>) - Method in class javascalautils.Failure
Applies the provided function to the Throwable of this Failure and returns a Success with the result.
recover(Function<Throwable, T>) - Method in class javascalautils.Success
Always returns this .
recover(Function<Throwable, T>) - Method in interface javascalautils.Try
Creates a new Try that in case this Try is a Failure will apply the function to recover to a Success.
recoverWith(Function<Throwable, Try<T>>) - Method in class javascalautils.Failure
Applies the provided function to the Throwable of this Failure and returns the result.
recoverWith(Function<Throwable, Try<T>>) - Method in class javascalautils.Success
Always returns this .
recoverWith(Function<Throwable, Try<T>>) - Method in interface javascalautils.Try
Creates a new Try that in case this Try is a Failure will apply the function to recover the Try rendered by the function.
requireNonNull(T) - Static method in class javascalautils.Validator
Checks that the specified object reference is not null and and throws IllegalArgumentException if it is.
requireNonNull(T, String) - Static method in class javascalautils.Validator
Checks that the specified object reference is not null and throws a customized IllegalArgumentException if it is.
result(long, TimeUnit) - 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(R) - Static method in class javascalautils.EitherCompanion
Creates an instance of Right.
Right<L,R> - Class in javascalautils
Represents the Right side of an Either.
Right(R) - Constructor for class javascalautils.Right
Creates an instance wrapping the provide value.
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) - Static method in class javascalautils.OptionCompanion
Creates an instance of Some.
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.
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
Returns the Try's value in a Stream if it is a Success, or an empty Stream if it is a Failure.
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
If this is a Left, then return the left value in Right or vice versa.
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.
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
Returns the value of this Some as a Left, or in case of None a Right containing the value from the provided supplier.
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
Returns the value of this Some as a Right, or in case of None a Left containing the value from the provided supplier.
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.
transform(Function<T, R>, Function<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.
TryCompanion - Class in javascalautils
Acts as a Scala type companion object for Try/Success/Failure.
tryComplete(Try<T>) - Method in interface javascalautils.concurrent.Promise
Tries to complete the Promise with either a Success or a Failure.
tryCompleteWith(Future<T>) - Method in interface javascalautils.concurrent.Promise
Tries to complete this Promise with the value from the provided Future once that is completed.
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.

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.
A C D E F G H I J L M N O P R S T V 
Skip navigation links

Copyright © 2015, Peter Nerg Apache License v2.0