A C D E F G H I J L M N O P R S T U W 
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 AutoCloseable resource.
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 Left value is present.
doOnRight(Consumer<? super R>) - Method in interface io.github.joselion.maybe.util.Either
Run an effect if the Right value 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 Maybe with 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 ThrowingConsumer expression 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 Left or Right.
Either.Left<L,​R> - Class in io.github.joselion.maybe.util
The Left implementation of Either
Either.Right<L,​R> - Class in io.github.joselion.maybe.util
The Right implementation of Either
empty() - Static method in class io.github.joselion.maybe.Maybe
Creates an empty Maybe instance.
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 a Either.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 mapper function.
flatMapLeft(Function<? super L, ? extends Either<? extends T, ? extends R>>) - Method in interface io.github.joselion.maybe.util.Either
Map the Left value 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 Right value 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 ThrowingRunnable expression.
from(ThrowingSupplier<? extends T, ? extends E>) - Static method in class io.github.joselion.maybe.Maybe
Solves the value of a throwing operation using a ThrowingSupplier expression.
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.
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.

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 Maybe has 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 null by the following annotations: org.eclipse.jdt.annotation.NonNullByDefault
io.github.joselion.maybe.helpers - package io.github.joselion.maybe.helpers
This package is checked for null by the following annotations: org.eclipse.jdt.annotation.NonNullByDefault
io.github.joselion.maybe.util - package io.github.joselion.maybe.util
This package is checked for null by 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 null by the following annotations: org.eclipse.jdt.annotation.NonNullByDefault
isEmpty() - Method in class io.github.joselion.maybe.Maybe
Checks if the Maybe is empty.
isLeft() - Method in interface io.github.joselion.maybe.util.Either
Returns true if the Left value is present, false otherwise.
isRight() - Method in interface io.github.joselion.maybe.util.Either
Returns true if the Right value 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 a Either.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 mapper function.
mapLeft(Function<? super L, ? extends T>) - Method in interface io.github.joselion.maybe.util.Either
Map the Left value to another if present.
mapRight(Function<? super R, ? extends T>) - Method in interface io.github.joselion.maybe.util.Either
Map the Right value to another if present.
mapToResource(Function<T, R>) - Method in class io.github.joselion.maybe.SolveHandler
Map the value to an AutoCloseable resource to be use in either a solve or effect operation.
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 Maybe wrapper of the given optional if not empty.
of(T) - Static method in class io.github.joselion.maybe.Maybe
Creates a Maybe wrapper of the given value.
ofLeft(L) - Static method in interface io.github.joselion.maybe.util.Either
Factory method to create an Either instance that contains a Left value.
ofRight(R) - Static method in interface io.github.joselion.maybe.util.Either
Factory method to create an Either instance that contains a Right value.
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.
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.

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.
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.
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.
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.
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.
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.
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.

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 ThrowingFunction expression 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 Maybe with 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 AutoCloseable resource 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 AutoCloseable resource to use in a solver or effect, using a ThrowingSupplier.

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 an E checked 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 an E checked exception.
ThrowingRunnable<E extends java.lang.Throwable> - Interface in io.github.joselion.maybe.util.function
The same as Runnable, but the lambda expression throws an E exception.
ThrowingSupplier<T,​E extends java.lang.Throwable> - Interface in io.github.joselion.maybe.util.function
The same as Supplier, but the lambda expression throws an E exception.
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 Maybe that contains either the solved value or the error.
toOptional() - Method in class io.github.joselion.maybe.Maybe
Safely unbox the value as an Optional which 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 Maybe suitable 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 AutoCloseable resource to use in a solver or effect.
A C D E F G H I J L M N O P R S T U W 
All Classes All Packages