Index

A C D E G I M O R T U 
All Classes and Interfaces|All Packages|Serialized Form

A

and(Result<U, E>) - Method in class dev.kylesilver.result.Err
 
and(Result<U, E>) - Method in class dev.kylesilver.result.Ok
 
and(Result<U, E>) - Method in interface dev.kylesilver.result.Result
Returns the provided argument if the result is Ok and propagates the original Err otherwise.
andThen(Function<T, Result<U, E>>) - Method in class dev.kylesilver.result.Err
 
andThen(Function<T, Result<U, E>>) - Method in class dev.kylesilver.result.Ok
 
andThen(Function<T, Result<U, E>>) - Method in interface dev.kylesilver.result.Result
Apply a fallible operation to the wrapped value if the result is Ok.

C

CheckedSupplier<T,E extends Throwable> - Interface in dev.kylesilver.result
Similar to the Supplier interface, but with additional type information to allow for the function to throw an exception.

D

dev.kylesilver.result - package dev.kylesilver.result
 

E

err() - Method in class dev.kylesilver.result.Err
 
err() - Method in class dev.kylesilver.result.Ok
 
err() - Method in interface dev.kylesilver.result.Result
Get the Err value if it exists.
err(E) - Static method in interface dev.kylesilver.result.Result
An Err indicates that a fallible operation has failed and yielded an error value.
Err<T,E> - Class in dev.kylesilver.result
Indicates that an operation has failed.
Err(E) - Constructor for class dev.kylesilver.result.Err
 
ErrorTypeMismatchException - Exception in dev.kylesilver.result
This exception is thrown when the Result.tryOr function is unable to cast a caught exception from the caller-provided CheckedSupplier into the desired error type.
ErrorTypeMismatchException(Class<? extends Throwable>, Throwable) - Constructor for exception dev.kylesilver.result.ErrorTypeMismatchException
 
expect(String) - Method in class dev.kylesilver.result.Err
 
expect(String) - Method in class dev.kylesilver.result.Ok
 
expect(String) - Method in interface dev.kylesilver.result.Result
Return the value if Ok, otherwise throw an exception with a custom error message.
expect(Function<E, F>) - Method in class dev.kylesilver.result.Err
 
expect(Function<E, F>) - Method in class dev.kylesilver.result.Ok
 
expect(Function<E, F>) - Method in interface dev.kylesilver.result.Result
Returns the value or throws a caller-defined exception.
expectErr(String) - Method in class dev.kylesilver.result.Err
 
expectErr(String) - Method in class dev.kylesilver.result.Ok
 
expectErr(String) - Method in interface dev.kylesilver.result.Result
Return the value if Err, otherwise throw an exception with a custom error message.
expectErr(Function<T, F>) - Method in class dev.kylesilver.result.Err
 
expectErr(Function<T, F>) - Method in class dev.kylesilver.result.Ok
 
expectErr(Function<T, F>) - Method in interface dev.kylesilver.result.Result
Returns the value or throws a caller-defined exception.

G

get() - Method in interface dev.kylesilver.result.CheckedSupplier
 

I

isErr() - Method in class dev.kylesilver.result.Err
 
isErr() - Method in class dev.kylesilver.result.Ok
 
isErr() - Method in interface dev.kylesilver.result.Result
Indicates whether the wrapped value is an Err.
isOk() - Method in class dev.kylesilver.result.Err
 
isOk() - Method in class dev.kylesilver.result.Ok
 
isOk() - Method in interface dev.kylesilver.result.Result
Indicates whether the wrapped value is an Ok.

M

map(Function<T, U>) - Method in class dev.kylesilver.result.Err
 
map(Function<T, U>) - Method in class dev.kylesilver.result.Ok
 
map(Function<T, U>) - Method in interface dev.kylesilver.result.Result
Apply a transformation to the wrapped value if the result is Ok.
mapErr(Function<E, F>) - Method in class dev.kylesilver.result.Err
 
mapErr(Function<E, F>) - Method in class dev.kylesilver.result.Ok
 
mapErr(Function<E, F>) - Method in interface dev.kylesilver.result.Result
Apply a transformation to the wrapped value if the result is an Err.
match(Consumer<T>, Consumer<E>) - Method in class dev.kylesilver.result.Err
 
match(Consumer<T>, Consumer<E>) - Method in class dev.kylesilver.result.Ok
 
match(Consumer<T>, Consumer<E>) - Method in interface dev.kylesilver.result.Result
Apply a lambda with no return type to the value of a result.
match(Function<T, U>, Function<E, U>) - Method in class dev.kylesilver.result.Err
 
match(Function<T, U>, Function<E, U>) - Method in class dev.kylesilver.result.Ok
 
match(Function<T, U>, Function<E, U>) - Method in interface dev.kylesilver.result.Result
Apply a transformation to the value of a result.

O

ok() - Method in class dev.kylesilver.result.Err
 
ok() - Method in class dev.kylesilver.result.Ok
 
ok() - Method in interface dev.kylesilver.result.Result
Get the Ok value if it exists.
ok(T) - Static method in interface dev.kylesilver.result.Result
An Ok indicates that a fallible operation has been performed successfully and that the caller has received their desired result.
Ok<T,E> - Class in dev.kylesilver.result
Indicates that an operation has been completed successfully.
Ok(T) - Constructor for class dev.kylesilver.result.Ok
 
or(Result<T, F>) - Method in class dev.kylesilver.result.Err
 
or(Result<T, F>) - Method in class dev.kylesilver.result.Ok
 
or(Result<T, F>) - Method in interface dev.kylesilver.result.Result
Returns the provided argument if the result is an Err and propagates the original Ok value otherwise.
orElse(Function<E, Result<T, F>>) - Method in class dev.kylesilver.result.Err
 
orElse(Function<E, Result<T, F>>) - Method in class dev.kylesilver.result.Ok
 
orElse(Function<E, Result<T, F>>) - Method in interface dev.kylesilver.result.Result
Apply a fallible operation to the wrapped value if the result is an Err.

R

Result<T,E> - Interface in dev.kylesilver.result
A result type represents the output of an operation with two possible outcomes.

T

tryOr(CheckedSupplier<T, E>, Class<E>) - Static method in interface dev.kylesilver.result.Result
Attempts to execute a fallible operation and returns any exceptions thrown during execution as the error type.

U

unwrap() - Method in class dev.kylesilver.result.Err
 
unwrap() - Method in class dev.kylesilver.result.Ok
 
unwrap() - Method in interface dev.kylesilver.result.Result
Retrieve the Ok value or throw an exception if the result is an Err.
unwrapErr() - Method in class dev.kylesilver.result.Err
 
unwrapErr() - Method in class dev.kylesilver.result.Ok
 
unwrapErr() - Method in interface dev.kylesilver.result.Result
Retrieve the Err value or throw an UnwrapException if the result is Ok.
UnwrapException - Exception in dev.kylesilver.result
This exception is thrown when a value is unwrapped.
UnwrapException(String) - Constructor for exception dev.kylesilver.result.UnwrapException
 
A C D E G I M O R T U 
All Classes and Interfaces|All Packages|Serialized Form