Package javascalautils
Contains various utility classes translated from the Scala language.
The following three types are all what is known as container types.
They represent various use cases, such as containing one or zero value (
It is possible to make transitions between the container types.
This image below aims to illustrate the transitions that can be made and where they lead.

Refer to the Javadoc for the classes or the Wiki for more details and examples:
https://github.com/pnerg/java-scala-util
The following three types are all what is known as container types.
They represent various use cases, such as containing one or zero value (
Option
), one of two values (Either
) and value or exception
(Try
) The aim with these utility classes is to provide neat and concise
programming patterns. It is possible to make transitions between the container types.
This image below aims to illustrate the transitions that can be made and where they lead.

Refer to the Javadoc for the classes or the Wiki for more details and examples:
https://github.com/pnerg/java-scala-util
-
Interface Summary Interface Description Either<L,R> Represents a value of one of two possible types.Option<T> Represents optional values.ThrowableFunction0<T> A function that takes no arguments and returns a value of type T.ThrowableFunction1<T,R> A function that takes a single argument of type R and returns a value of type T.Try<T> The Try type represents a computation that may either result in an exception, or return a successfully computed value.VoidFunction0 A FunctionalInterface that takes no parameters and has no return but is allowed to throw exceptions. -
Class Summary Class Description EitherCompanion Failure<T> Represents the failure implementation ofTry
.Left<L,R> LeftProjection<L,R> This is a left-biased wrapper for an instance ofEither
.None<T> Represents an emptyOption
.OptionCompanion Right<L,R> RightProjection<L,R> This is a right-biased wrapper for an instance ofEither
.Some<T> Represents anOption
holding a value.Success<T> Represents the successful implementation ofTry
.TryCompanion Unit Represents the type scala.Unit.Validator Used internally to validate parameters -
Exception Summary Exception Description BrokenFunctionException Used when a function throws an exception which cannot be raised.