A C D E F G H I J L M N O P R S T U W
All Classes All Packages
All Classes All Packages
All Classes All Packages
A
- accept(T) - Method in interface io.github.joselion.maybe.util.function.ThrowingConsumer
-
Accepts this function with the given argument, or throws an exception.
- apply(T) - Method in interface io.github.joselion.maybe.util.function.ThrowingFunction
-
Applies this function to the given argument, or throws an exception.
C
- cast(Class<U>) - Method in class io.github.joselion.maybe.Maybe
-
If the value is present, cast the value to another type.
- cast(Class<U>) - Method in class io.github.joselion.maybe.SolveHandler
-
If the value is present, cast the value to anoter type.
- cast(Object) - Static method in class io.github.joselion.maybe.helpers.Commons
- catchError(Class<X>, Consumer<? super X>) - Method in class io.github.joselion.maybe.EffectHandler
-
Catch the error if present and if it's instance of the provided type.
- catchError(Class<X>, Function<? super X, ? extends T>) - Method in class io.github.joselion.maybe.SolveHandler
-
Catch the error if is present and is an instance of the provided type.
- catchError(Consumer<? super E>) - Method in class io.github.joselion.maybe.EffectHandler
-
Catch the error if is present.
- catchError(Function<? super E, ? extends T>) - Method in class io.github.joselion.maybe.SolveHandler
-
Catch the error if is present and handle it to return a new value.
- CloseableHandler<T extends java.lang.AutoCloseable,E extends java.lang.Throwable> - Class in io.github.joselion.maybe
-
CloseableHandler is an API that allows to solve or run an effect using an
AutoCloseableresource. - Commons - Class in io.github.joselion.maybe.helpers
D
- doOnError(Class<X>, Consumer<? super X>) - Method in class io.github.joselion.maybe.EffectHandler
-
Run an effect if the error is present and is an instance of the provided type.
- doOnError(Class<X>, Consumer<? super X>) - Method in class io.github.joselion.maybe.SolveHandler
-
Run an effect if the error is present and is an instance of the provided type.
- doOnError(Consumer<? super E>) - Method in class io.github.joselion.maybe.EffectHandler
-
Run an effect if the error is present.
- doOnError(Consumer<? super E>) - Method in class io.github.joselion.maybe.SolveHandler
-
Run an effect if the error is present.
- doOnLeft(Consumer<? super L>) - Method in interface io.github.joselion.maybe.util.Either
-
Run an effect if the
Leftvalue is present. - doOnRight(Consumer<? super R>) - Method in interface io.github.joselion.maybe.util.Either
-
Run an effect if the
Rightvalue is present. - doOnSuccess(Runnable) - Method in class io.github.joselion.maybe.EffectHandler
-
Runs an effect if the operation succeeds.
- doOnSuccess(Consumer<? super T>) - Method in class io.github.joselion.maybe.SolveHandler
-
Run an effect if the operation solved successfully.
E
- effect(ThrowingConsumer<? super T, ? extends E>) - Method in class io.github.joselion.maybe.Maybe
-
Chain the
Maybewith another effect, if and only if the previous operation was handled with no errors. - effect(ThrowingConsumer<? super T, ? extends X>) - Method in class io.github.joselion.maybe.CloseableHandler
-
If the resource is present, runs an effect that may throw an exception using a
ThrowingConsumerexpression which has the previously prepared resource in the argument. - effect(ThrowingConsumer<? super T, ? extends X>) - Method in class io.github.joselion.maybe.SolveHandler
-
Chain the previous operation to an effect if the value was solved.
- effect(ThrowingConsumer<? super T, ? extends X>, ThrowingConsumer<? super E, ? extends X>) - Method in class io.github.joselion.maybe.SolveHandler
-
Chain the previous operation to an effect covering both the success or error cases in two different callbacks.
- effect(ThrowingRunnable<? extends X>) - Method in class io.github.joselion.maybe.EffectHandler
-
Chain another effect if the previous completed with no error.
- effect(ThrowingRunnable<? extends X>, ThrowingConsumer<? super E, ? extends X>) - Method in class io.github.joselion.maybe.EffectHandler
-
Chain another effect covering both cases of success or error of the previous effect in two different callbacks.
- EffectHandler<E extends java.lang.Throwable> - Class in io.github.joselion.maybe
-
EffectHandler is an API to handle the posible error of a
Maybe's effect operation. - Either<L,R> - Interface in io.github.joselion.maybe.util
-
Either is a monadic wrapper that contains one of two possible values which are represented as
LeftorRight. - Either.Left<L,R> - Class in io.github.joselion.maybe.util
-
The
Leftimplementation ofEither - Either.Right<L,R> - Class in io.github.joselion.maybe.util
-
The
Rightimplementation ofEither - empty() - Static method in class io.github.joselion.maybe.Maybe
-
Creates an empty
Maybeinstance. - equals(Object) - Method in class io.github.joselion.maybe.Maybe
-
Checks if some other object is equal to this
Maybe. - equals(Object) - Method in class io.github.joselion.maybe.util.Either.Left
- equals(Object) - Method in class io.github.joselion.maybe.util.Either.Right
F
- flatMap(Function<? super L, ? extends Either<? extends T, ? extends S>>, Function<? super R, ? extends Either<? extends T, ? extends S>>) - Method in interface io.github.joselion.maybe.util.Either
-
Shortcut method which does a
Either.flatMapLeft(Function)and aEither.flatMapRight(Function)in a single operation. - flatMap(Function<? super T, Maybe<? extends U>>) - Method in class io.github.joselion.maybe.Maybe
-
If present, maps the value to another using the provided mapper function.
- flatMap(Function<? super T, Maybe<? extends U>>) - Method in class io.github.joselion.maybe.SolveHandler
-
If the value is present, map it to another value using the
mapperfunction. - flatMapLeft(Function<? super L, ? extends Either<? extends T, ? extends R>>) - Method in interface io.github.joselion.maybe.util.Either
-
Map the
Leftvalue to another if present. - flatMapRight(Function<? super R, ? extends Either<? extends L, ? extends T>>) - Method in interface io.github.joselion.maybe.util.Either
-
Map the
Rightvalue to another if present. - from(ThrowingRunnable<? extends E>) - Static method in class io.github.joselion.maybe.Maybe
-
Runs an effect that may throw an exception using a
ThrowingRunnableexpression. - from(ThrowingSupplier<? extends T, ? extends E>) - Static method in class io.github.joselion.maybe.Maybe
-
Solves the value of a throwing operation using a
ThrowingSupplierexpression. - fromEffect(ThrowingRunnable<? extends E>) - Static method in class io.github.joselion.maybe.Maybe
-
Deprecated, for removal: This API element is subject to removal in a future version.in favor of
Maybe.from(ThrowingRunnable) - fromOptional(Optional<T>) - Static method in class io.github.joselion.maybe.Maybe
-
Deprecated, for removal: This API element is subject to removal in a future version.in favor of
Maybe.of(Optional) - fromResolver(ThrowingSupplier<? extends T, ? extends E>) - Static method in class io.github.joselion.maybe.Maybe
-
Deprecated, for removal: This API element is subject to removal in a future version.in favor of
Maybe.from(ThrowingSupplier)
G
- get() - Method in interface io.github.joselion.maybe.util.function.ThrowingSupplier
-
Gets a result or throws an exception.
H
- hashCode() - Method in class io.github.joselion.maybe.Maybe
-
Returns the hash code of the value, if present, otherwise
0(zero) if no value is present. - hashCode() - Method in class io.github.joselion.maybe.util.Either.Left
- hashCode() - Method in class io.github.joselion.maybe.util.Either.Right
- hasNothing() - Method in class io.github.joselion.maybe.Maybe
-
Deprecated, for removal: This API element is subject to removal in a future version.in favor of
Maybe.isEmpty() - hasValue() - Method in class io.github.joselion.maybe.Maybe
-
Checks if the
Maybehas a value.
I
- identity() - Static method in interface io.github.joselion.maybe.util.function.ThrowingFunction
-
Returns a function that always returns its input argument.
- io.github.joselion.maybe - package io.github.joselion.maybe
-
This package is checked for
nullby the following annotations: org.eclipse.jdt.annotation.NonNullByDefault - io.github.joselion.maybe.helpers - package io.github.joselion.maybe.helpers
-
This package is checked for
nullby the following annotations: org.eclipse.jdt.annotation.NonNullByDefault - io.github.joselion.maybe.util - package io.github.joselion.maybe.util
-
This package is checked for
nullby the following annotations: org.eclipse.jdt.annotation.NonNullByDefault - io.github.joselion.maybe.util.function - package io.github.joselion.maybe.util.function
-
This package is checked for
nullby the following annotations: org.eclipse.jdt.annotation.NonNullByDefault - isEmpty() - Method in class io.github.joselion.maybe.Maybe
-
Checks if the
Maybeis empty. - isLeft() - Method in interface io.github.joselion.maybe.util.Either
-
Returns true if the
Leftvalue is present, false otherwise. - isRight() - Method in interface io.github.joselion.maybe.util.Either
-
Returns true if the
Rightvalue is present, false otherwise.
J
- just(T) - Static method in class io.github.joselion.maybe.Maybe
-
Deprecated, for removal: This API element is subject to removal in a future version.in favor of
Maybe.of(Object)
L
- leftOrElse(L) - Method in interface io.github.joselion.maybe.util.Either
-
Terminal operator.
- leftOrNull() - Method in interface io.github.joselion.maybe.util.Either
-
Terminal operator.
- leftToOptional() - Method in interface io.github.joselion.maybe.util.Either
-
Terminal operator.
M
- map(Function<? super L, ? extends T>, Function<? super R, ? extends S>) - Method in interface io.github.joselion.maybe.util.Either
-
Shortcut method which does a
Either.mapLeft(Function)and aEither.mapRight(Function)in a single operation. - map(Function<? super T, ? extends U>) - Method in class io.github.joselion.maybe.Maybe
-
If present, maps the value to another using the provided mapper function.
- map(Function<? super T, ? extends U>) - Method in class io.github.joselion.maybe.SolveHandler
-
If the value is present, map it to another value using the
mapperfunction. - mapLeft(Function<? super L, ? extends T>) - Method in interface io.github.joselion.maybe.util.Either
-
Map the
Leftvalue to another if present. - mapRight(Function<? super R, ? extends T>) - Method in interface io.github.joselion.maybe.util.Either
-
Map the
Rightvalue to another if present. - mapToResource(Function<T, R>) - Method in class io.github.joselion.maybe.SolveHandler
-
Map the value to an
AutoCloseableresource to be use in either asolveoreffectoperation. - Maybe<T> - Class in io.github.joselion.maybe
-
Maybe is a monadic wrapper that may contain a value.
N
- nothing() - Static method in class io.github.joselion.maybe.Maybe
-
Deprecated, for removal: This API element is subject to removal in a future version.in favor of
Maybe.empty()
O
- of(Optional<T>) - Static method in class io.github.joselion.maybe.Maybe
-
Creates a
Maybewrapper of the given optional if not empty. - of(T) - Static method in class io.github.joselion.maybe.Maybe
-
Creates a
Maybewrapper of the given value. - ofLeft(L) - Static method in interface io.github.joselion.maybe.util.Either
-
Factory method to create an
Eitherinstance that contains aLeftvalue. - ofRight(R) - Static method in interface io.github.joselion.maybe.util.Either
-
Factory method to create an
Eitherinstance that contains aRightvalue. - orElse(Consumer<? super E>) - Method in class io.github.joselion.maybe.EffectHandler
-
Terminal operation to handle the error if present.
- orElse(Function<? super E, ? extends T>) - Method in class io.github.joselion.maybe.SolveHandler
-
Returns the solved value if present.
- orElse(T) - Method in class io.github.joselion.maybe.SolveHandler
-
Returns the solved value if present.
- orElseGet(Supplier<? extends T>) - Method in class io.github.joselion.maybe.SolveHandler
-
Returns the solved value if present.
- orNull() - Method in class io.github.joselion.maybe.SolveHandler
-
Returns the solved value if present.
- orThrow() - Method in class io.github.joselion.maybe.EffectHandler
-
Throws the error if present.
- orThrow() - Method in class io.github.joselion.maybe.SolveHandler
-
Returns the solved value if present.
- orThrow(Function<? super E, ? extends X>) - Method in class io.github.joselion.maybe.EffectHandler
-
If an error is present, map the error to another exception and throw it.
- orThrow(Function<? super E, ? extends X>) - Method in class io.github.joselion.maybe.SolveHandler
-
Returns the value solved/handled if present.
P
- partial(ThrowingConsumer<? super S, ? extends E>) - Static method in class io.github.joselion.maybe.Maybe
-
Convenience partial application of an
effect. - partial(ThrowingFunction<? super S, ? extends T, ? extends E>) - Static method in class io.github.joselion.maybe.Maybe
-
Convenience partial application of a
solver. - partialEffect(ThrowingConsumer<? super S, ? extends E>) - Static method in class io.github.joselion.maybe.Maybe
-
Deprecated, for removal: This API element is subject to removal in a future version.in favor of
Maybe.partial(ThrowingConsumer) - partialResolver(ThrowingFunction<? super S, ? extends T, ? extends E>) - Static method in class io.github.joselion.maybe.Maybe
-
Deprecated, for removal: This API element is subject to removal in a future version.in favor of
Maybe.partial(ThrowingFunction)
R
- resolve(ThrowingFunction<? super T, ? extends S, ? extends X>) - Method in class io.github.joselion.maybe.SolveHandler
-
Deprecated, for removal: This API element is subject to removal in a future version.in favor of
SolveHandler.solve(ThrowingFunction) - resolve(ThrowingFunction<? super T, ? extends S, ? extends X>, ThrowingFunction<? super E, ? extends S, ? extends X>) - Method in class io.github.joselion.maybe.SolveHandler
-
Deprecated, for removal: This API element is subject to removal in a future version.
- resolve(ThrowingFunction<? super T, ? extends U, ? extends E>) - Method in class io.github.joselion.maybe.Maybe
-
Deprecated, for removal: This API element is subject to removal in a future version.in favor of
Maybe.solve(ThrowingFunction) - resolveClosing(ThrowingFunction<? super T, ? extends S, ? extends X>) - Method in class io.github.joselion.maybe.CloseableHandler
-
Deprecated, for removal: This API element is subject to removal in a future version.in favor of
CloseableHandler.solve(ThrowingFunction) - rightOrElse(R) - Method in interface io.github.joselion.maybe.util.Either
-
Terminal operator.
- rightOrNull() - Method in interface io.github.joselion.maybe.util.Either
-
Terminal operator.
- rightToOptional() - Method in interface io.github.joselion.maybe.util.Either
-
Terminal operator.
- run() - Method in interface io.github.joselion.maybe.util.function.ThrowingRunnable
-
Runs the operation, or throws an exception.
- runEffect(ThrowingConsumer<? super T, ? extends E>) - Method in class io.github.joselion.maybe.Maybe
-
Deprecated, for removal: This API element is subject to removal in a future version.in favor of
Maybe.effect(ThrowingConsumer) - runEffect(ThrowingConsumer<? super T, ? extends X>) - Method in class io.github.joselion.maybe.SolveHandler
-
Deprecated, for removal: This API element is subject to removal in a future version.in favor of
SolveHandler.effect(ThrowingConsumer) - runEffect(ThrowingConsumer<? super T, ? extends X>, ThrowingConsumer<? super E, ? extends X>) - Method in class io.github.joselion.maybe.SolveHandler
-
Deprecated, for removal: This API element is subject to removal in a future version.
- runEffect(ThrowingRunnable<? extends X>) - Method in class io.github.joselion.maybe.EffectHandler
-
Deprecated, for removal: This API element is subject to removal in a future version.in favor of
EffectHandler.effect(ThrowingRunnable) - runEffect(ThrowingRunnable<? extends X>, ThrowingConsumer<? super E, ? extends X>) - Method in class io.github.joselion.maybe.EffectHandler
-
Deprecated, for removal: This API element is subject to removal in a future version.
- runEffectClosing(ThrowingConsumer<? super T, ? extends X>) - Method in class io.github.joselion.maybe.CloseableHandler
-
Deprecated, for removal: This API element is subject to removal in a future version.in favor of
CloseableHandler.effect(ThrowingConsumer)
S
- solve(ThrowingFunction<? super T, ? extends S, ? extends X>) - Method in class io.github.joselion.maybe.CloseableHandler
-
If the resource is present, solves the value of a throwing operation using a
ThrowingFunctionexpression which has the previously prepared resource in the argument. - solve(ThrowingFunction<? super T, ? extends S, ? extends X>) - Method in class io.github.joselion.maybe.SolveHandler
-
Chain another solver function if the value was solved.
- solve(ThrowingFunction<? super T, ? extends S, ? extends X>, ThrowingFunction<? super E, ? extends S, ? extends X>) - Method in class io.github.joselion.maybe.SolveHandler
-
Chain another solver covering both cases of success or error of the previous solver in two different callbacks.
- solve(ThrowingFunction<? super T, ? extends U, ? extends E>) - Method in class io.github.joselion.maybe.Maybe
-
Chain the
Maybewith another solver, if and only if the previous operation was handled with no errors. - SolveHandler<T,E extends java.lang.Throwable> - Class in io.github.joselion.maybe
-
SolveHandler is an API to handle the possible error of a
Maybe's solve operation. - solveResource(ThrowingFunction<? super T, ? extends R, ? extends X>) - Method in class io.github.joselion.maybe.SolveHandler
-
Solve a function that may create an
AutoCloseableresource using the value in the handle, (if any). - solveResource(ThrowingSupplier<? extends R, ? extends E>) - Static method in class io.github.joselion.maybe.Maybe
-
Prepare an
AutoCloseableresource to use in a solver or effect, using aThrowingSupplier.
T
- ThrowingConsumer<T,E extends java.lang.Throwable> - Interface in io.github.joselion.maybe.util.function
-
The same as
Consumer, but the lambda expression throws anEchecked exception. - ThrowingFunction<T,R,E extends java.lang.Throwable> - Interface in io.github.joselion.maybe.util.function
-
The same as
Function, but the lambda expression throws anEchecked exception. - ThrowingRunnable<E extends java.lang.Throwable> - Interface in io.github.joselion.maybe.util.function
-
The same as
Runnable, but the lambda expression throws anEexception. - ThrowingSupplier<T,E extends java.lang.Throwable> - Interface in io.github.joselion.maybe.util.function
-
The same as
Supplier, but the lambda expression throws anEexception. - toEither() - Method in class io.github.joselion.maybe.SolveHandler
-
Transforms the handler to an
Either, in which the left side might contain the error and the right side might contain the solved value. - toMaybe() - Method in class io.github.joselion.maybe.SolveHandler
-
Transforms the handler to a
Maybethat contains either the solved value or the error. - toOptional() - Method in class io.github.joselion.maybe.Maybe
-
Safely unbox the value as an
Optionalwhich may or may not contain a value. - toOptional() - Method in class io.github.joselion.maybe.SolveHandler
-
Transforms the handler to an
Optional. - toString() - Method in class io.github.joselion.maybe.Maybe
-
Returns a non-empty string representation of this
Maybesuitable for debugging. - toString() - Method in class io.github.joselion.maybe.util.Either.Left
- toString() - Method in class io.github.joselion.maybe.util.Either.Right
U
- unwrap(Function<? super L, ? extends T>, Function<? super R, ? extends T>) - Method in class io.github.joselion.maybe.util.Either.Left
- unwrap(Function<? super L, ? extends T>, Function<? super R, ? extends T>) - Method in class io.github.joselion.maybe.util.Either.Right
- unwrap(Function<? super L, ? extends T>, Function<? super R, ? extends T>) - Method in interface io.github.joselion.maybe.util.Either
-
Terminal operator.
W
- withResource(R) - Static method in class io.github.joselion.maybe.Maybe
-
Prepare an
AutoCloseableresource to use in a solver or effect.
All Classes All Packages