A C D E F G H I J L M N O P R 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.ResolveHandler
If the value is present, cast the value to anoter type.
catchError(Class<X>, Consumer<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<X, T>) - Method in class io.github.joselion.maybe.ResolveHandler
Catch the error if is present and is an instance of the provided type.
catchError(Consumer<E>) - Method in class io.github.joselion.maybe.EffectHandler
Catch the error if is present.
catchError(Function<E, T>) - Method in class io.github.joselion.maybe.ResolveHandler
Catch the error if is present and handle it to return a new value.

D

doOnError(Class<X>, Consumer<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<X>) - Method in class io.github.joselion.maybe.ResolveHandler
Run an effect if the error is present and is an instance of the provided type.
doOnError(Consumer<E>) - Method in class io.github.joselion.maybe.EffectHandler
Run an effect if the error is present.
doOnError(Consumer<E>) - Method in class io.github.joselion.maybe.ResolveHandler
Run an effect if the error is present.
doOnLeft(Consumer<L>) - Method in interface io.github.joselion.maybe.util.Either
Run an effect if the Left value is present.
doOnLeft(Consumer<L>) - Method in class io.github.joselion.maybe.util.Either.Left
 
doOnLeft(Consumer<L>) - Method in class io.github.joselion.maybe.util.Either.Right
 
doOnRight(Consumer<R>) - Method in interface io.github.joselion.maybe.util.Either
Run an effect if the Right value is present.
doOnRight(Consumer<R>) - Method in class io.github.joselion.maybe.util.Either.Left
 
doOnRight(Consumer<R>) - Method in class io.github.joselion.maybe.util.Either.Right
 
doOnSuccess(Runnable) - Method in class io.github.joselion.maybe.EffectHandler
Runs an effect if the operation succeeds.
doOnSuccess(Consumer<T>) - Method in class io.github.joselion.maybe.ResolveHandler
Run an effect if the operation resolved successfully.

E

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
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<T, Maybe<U>>) - Method in class io.github.joselion.maybe.Maybe
If present, maps the value to another using the provided mapper function.
fromEffect(ThrowingRunnable<E>) - Static method in class io.github.joselion.maybe.Maybe
Runs an effect that may throw an exception using a ThrowingRunnable expression.
fromOptional(Optional<T>) - Static method in class io.github.joselion.maybe.Maybe
Creates a Maybe wrapper of the given value if the optional is not empty.
fromResolver(ThrowingSupplier<T, E>) - Static method in class io.github.joselion.maybe.Maybe
Resolves the value of a throwing operation using a ThrowingSupplier expression.

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
Checks if the Maybe has nothing.
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.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
isLeft() - Method in interface io.github.joselion.maybe.util.Either
Returns true if the Left value is present, false otherwise.
isLeft() - Method in class io.github.joselion.maybe.util.Either.Left
 
isLeft() - Method in class io.github.joselion.maybe.util.Either.Right
 
isRight() - Method in interface io.github.joselion.maybe.util.Either
Returns true if the Right value is present, false otherwise.
isRight() - Method in class io.github.joselion.maybe.util.Either.Left
 
isRight() - Method in class io.github.joselion.maybe.util.Either.Right
 

J

just(T) - Static method in class io.github.joselion.maybe.Maybe
Creates a Maybe wrapper of the given value.

L

leftOrElse(L) - Method in class io.github.joselion.maybe.util.Either.Left
 
leftOrElse(L) - Method in interface io.github.joselion.maybe.util.Either
Terminal operator.
leftOrElse(L) - Method in class io.github.joselion.maybe.util.Either.Right
 
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<T, U>) - Method in class io.github.joselion.maybe.Maybe
If present, maps the value to another using the provided mapper function.
map(Function<T, U>) - Method in class io.github.joselion.maybe.ResolveHandler
If the value is present, map it to another value through the mapper function.
mapLeft(Function<L, T>) - Method in class io.github.joselion.maybe.util.Either.Left
 
mapLeft(Function<L, T>) - Method in interface io.github.joselion.maybe.util.Either
Map the Left value to another if present.
mapLeft(Function<L, T>) - Method in class io.github.joselion.maybe.util.Either.Right
 
mapRight(Function<R, T>) - Method in class io.github.joselion.maybe.util.Either.Left
 
mapRight(Function<R, T>) - Method in interface io.github.joselion.maybe.util.Either
Map the Right value to another if present.
mapRight(Function<R, T>) - Method in class io.github.joselion.maybe.util.Either.Right
 
mapToResource(Function<T, R>) - Method in class io.github.joselion.maybe.ResolveHandler
Map the value to an AutoCloseable resource to be use in either a resolveClosing or a runEffectClosing operation, which will close the resource when it completes.
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
Creates a Maybe wrapper with nothing on it.

O

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<E>) - Method in class io.github.joselion.maybe.EffectHandler
Terminal operation to handle the error if present.
orElse(Function<E, T>) - Method in class io.github.joselion.maybe.ResolveHandler
Returns the resolved value if present.
orElse(T) - Method in class io.github.joselion.maybe.ResolveHandler
Returns the resolved value if present.
orElseGet(Supplier<T>) - Method in class io.github.joselion.maybe.ResolveHandler
Returns the resolved value if present.
orNull() - Method in class io.github.joselion.maybe.ResolveHandler
Returns the resolved 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.ResolveHandler
Returns the resolved value if present.
orThrow(Function<E, 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<E, X>) - Method in class io.github.joselion.maybe.ResolveHandler
Returns the value resolved/handled if present.

P

partialEffect(ThrowingConsumer<S, E>) - Static method in class io.github.joselion.maybe.Maybe
Convenience partial application of an effect.
partialResolver(ThrowingFunction<S, T, E>) - Static method in class io.github.joselion.maybe.Maybe
Convenience partial application of a resolver.

R

resolve(ThrowingFunction<T, S, X>) - Method in class io.github.joselion.maybe.ResolveHandler
Chain another resolver function if the value was resolved.
resolve(ThrowingFunction<T, S, X>, ThrowingFunction<E, S, X>) - Method in class io.github.joselion.maybe.ResolveHandler
Chain another resolver covering both cases of success or error of the previous resolver in two different callbacks.
resolve(ThrowingFunction<T, U, E>) - Method in class io.github.joselion.maybe.Maybe
Chain the Maybe with another resolver, if and only if the previous operation was handled with no errors.
resolveClosing(ThrowingFunction<R, T, X>) - Method in class io.github.joselion.maybe.ResourceHolder
If the resource is present, resolves the value of a throwing operation using a ThrowingFunction expression which has the previously prepared resource in the argument.
ResolveHandler<T,​E extends java.lang.Throwable> - Class in io.github.joselion.maybe
ResolveHandler is an API to handle the possible error of a Maybe's resolve operation.
ResourceHolder<R extends java.lang.AutoCloseable,​E extends java.lang.Throwable> - Class in io.github.joselion.maybe
ResourceHolder is a "middle step" API that allows to resolve or run an effect using a previously passed AutoCloseable resource.
rightOrElse(R) - Method in class io.github.joselion.maybe.util.Either.Left
 
rightOrElse(R) - Method in class io.github.joselion.maybe.util.Either.Right
 
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<T, 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.
runEffect(ThrowingConsumer<T, X>) - Method in class io.github.joselion.maybe.ResolveHandler
Chain the previous operation to an effect if the value was resolved.
runEffect(ThrowingConsumer<T, X>, ThrowingConsumer<E, X>) - Method in class io.github.joselion.maybe.ResolveHandler
Chain the previous operation to an effect covering both the success or error cases in two different callbacks.
runEffect(ThrowingRunnable<X>) - Method in class io.github.joselion.maybe.EffectHandler
Chain another effect if the previous completed with no error.
runEffect(ThrowingRunnable<X>, ThrowingConsumer<E, 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.
runEffectClosing(ThrowingConsumer<R, X>) - Method in class io.github.joselion.maybe.ResourceHolder
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.

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.ResolveHandler
Transforms the handler to an Either, in which the left side might contain the error and the right side might contain the resolved value.
toMaybe() - Method in class io.github.joselion.maybe.ResolveHandler
Transforms the handler to a Maybe that contains either the resolved 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.ResolveHandler
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<L, T>, Function<R, T>) - Method in class io.github.joselion.maybe.util.Either.Left
 
unwrap(Function<L, T>, Function<R, T>) - Method in class io.github.joselion.maybe.util.Either.Right
 
unwrap(Function<L, T>, Function<R, 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 resolver or effect.
A C D E F G H I J L M N O P R T U W 
All Classes All Packages