Index

A B C E F G H I M N O R S T W 
All Classes and Interfaces|All Packages|Serialized Form

A

accumulator() - Method in class nl.markv.result.collect.ResultListCollector
 
accumulator() - Method in class nl.markv.result.collect.ResultSetCollector
 
adaptErr() - Method in class nl.markv.result.Err
If this result is Ok, change the generic type for Err.
adaptErr() - Method in class nl.markv.result.Ok
If this result is Ok, change the generic type for Err.
adaptErr() - Method in interface nl.markv.result.Result
If this result is Ok, change the generic type for Err.
adaptOk() - Method in class nl.markv.result.Err
If this result is Err, change the generic type for Ok.
adaptOk() - Method in class nl.markv.result.Ok
If this result is Err, change the generic type for Ok.
adaptOk() - Method in interface nl.markv.result.Result
If this result is Err, change the generic type for Ok.
and(Supplier<Result<U, E>>) - Method in class nl.markv.result.Err
Returns the current Result if it is Err, and produces the next result (given by the argument) otherwise.
and(Supplier<Result<U, E>>) - Method in class nl.markv.result.Ok
Returns the current Result if it is Err, and produces the next result (given by the argument) otherwise.
and(Supplier<Result<U, E>>) - Method in interface nl.markv.result.Result
Returns the current Result if it is Err, and produces the next result (given by the argument) otherwise.
and(Result<U, E>) - Method in class nl.markv.result.Err
Returns the current Result if it is Err, and the next one otherwise.
and(Result<U, E>) - Method in class nl.markv.result.Ok
Returns the current Result if it is Err, and the next one otherwise.
and(Result<U, E>) - Method in interface nl.markv.result.Result
Returns the current Result if it is Err, and the next one otherwise.
attempt() - Method in interface nl.markv.result.Attempt
 
attempt(Attempt<U>) - Static method in interface nl.markv.result.Result
Attempt to run the given operation.
Attempt<T> - Interface in nl.markv.result
Like Supplier, but can throw checked exceptions.

B

branch(Function<T, R>, Function<E, R>) - Method in class nl.markv.result.Err
Call on of the functions, depending on Ok or Err.
branch(Function<T, R>, Function<E, R>) - Method in class nl.markv.result.Ok
Call on of the functions, depending on Ok or Err.
branch(Function<T, R>, Function<E, R>) - Method in interface nl.markv.result.Result
Call on of the functions, depending on Ok or Err.

C

characteristics() - Method in class nl.markv.result.collect.ResultListCollector
 
characteristics() - Method in class nl.markv.result.collect.ResultSetCollector
 
combiner() - Method in class nl.markv.result.collect.ResultListCollector
 
combiner() - Method in class nl.markv.result.collect.ResultSetCollector
 
contains(T) - Method in class nl.markv.result.Err
Whether this Result is an Ok that contains an object equal to the argument.
contains(T) - Method in class nl.markv.result.Ok
Whether this Result is an Ok that contains an object equal to the argument.
contains(T) - Method in interface nl.markv.result.Result
Whether this Result is an Ok that contains an object equal to the argument.
containsErr(E) - Method in class nl.markv.result.Err
Whether this Result is an Err that contains an object equal to the argument.
containsErr(E) - Method in class nl.markv.result.Ok
Whether this Result is an Err that contains an object equal to the argument.
containsErr(E) - Method in interface nl.markv.result.Result
Whether this Result is an Err that contains an object equal to the argument.

E

empty() - Static method in class nl.markv.result.Err
Create a failed Result where the Err type is None.
equals(Object) - Method in class nl.markv.result.Err
 
equals(Object) - Method in class nl.markv.result.Ok
 
err(E) - Static method in interface nl.markv.result.Result
Create an unsuccessful Result.
Err<T,E> - Class in nl.markv.result
 
errMatches(Predicate<E>) - Method in class nl.markv.result.Err
If this Result is Err, the predicate will be tested against its content.
errMatches(Predicate<E>) - Method in class nl.markv.result.Ok
If this Result is Err, the predicate will be tested against its content.
errMatches(Predicate<E>) - Method in interface nl.markv.result.Result
If this Result is Err, the predicate will be tested against its content.
errOr(E) - Method in class nl.markv.result.Err
Like Result.errOrNullable(E), but does not allow null input or output.
errOr(E) - Method in class nl.markv.result.Ok
Like Result.errOrNullable(E), but does not allow null input or output.
errOr(E) - Method in interface nl.markv.result.Result
Like Result.errOrNullable(E), but does not allow null input or output.
errOr(Supplier<E>) - Method in class nl.markv.result.Err
Like Result.errOrNullable(Supplier), but does not allow null input or output.
errOr(Supplier<E>) - Method in class nl.markv.result.Ok
Like Result.errOrNullable(Supplier), but does not allow null input or output.
errOr(Supplier<E>) - Method in interface nl.markv.result.Result
Like Result.errOrNullable(Supplier), but does not allow null input or output.
errOrNull() - Method in class nl.markv.result.Err
errOrNull() - Method in class nl.markv.result.Ok
errOrNull() - Method in interface nl.markv.result.Result
 
errOrNullable(E) - Method in class nl.markv.result.Err
If this Result is Err, return the value.
errOrNullable(E) - Method in class nl.markv.result.Ok
If this Result is Err, return the value.
errOrNullable(E) - Method in interface nl.markv.result.Result
If this Result is Err, return the value.
errOrNullable(Supplier<E>) - Method in class nl.markv.result.Err
If this Result is Err, return the value.
errOrNullable(Supplier<E>) - Method in class nl.markv.result.Ok
If this Result is Err, return the value.
errOrNullable(Supplier<E>) - Method in interface nl.markv.result.Result
If this Result is Err, return the value.

F

finisher() - Method in class nl.markv.result.collect.ResultListCollector
 
finisher() - Method in class nl.markv.result.collect.ResultSetCollector
 
flatMap(Function<T, Result<U, E>>) - Method in class nl.markv.result.Err
Map the Ok value to a new Result value, flattening the two results to a single one.
flatMap(Function<T, Result<U, E>>) - Method in class nl.markv.result.Ok
Map the Ok value to a new Result value, flattening the two results to a single one.
flatMap(Function<T, Result<U, E>>) - Method in interface nl.markv.result.Result
Map the Ok value to a new Result value, flattening the two results to a single one.
flatMapErr(Function<E, Result<T, F>>) - Method in class nl.markv.result.Err
Map the Err value to a new Result value, flattening the two results to a single one.
flatMapErr(Function<E, Result<T, F>>) - Method in class nl.markv.result.Ok
Map the Err value to a new Result value, flattening the two results to a single one.
flatMapErr(Function<E, Result<T, F>>) - Method in interface nl.markv.result.Result
Map the Err value to a new Result value, flattening the two results to a single one.
flatten(Result<Result<U, F>, F>) - Static method in interface nl.markv.result.Result
Flatten a nested result.
from(Optional<T>) - Static method in interface nl.markv.result.Result
Create a Result from an Optional.
fromNullable(T) - Static method in interface nl.markv.result.Result
Create a Result from a nullable reference.

G

get() - Method in class nl.markv.result.Err
Returns the value contained by this Ok.
get() - Static method in class nl.markv.result.None
 
get() - Method in class nl.markv.result.Ok
Returns the value contained by this Ok.
getErrOrThrow() - Method in class nl.markv.result.Err
If the Result is Err, return its content.
getErrOrThrow() - Method in class nl.markv.result.Ok
Deprecated.
Marked as deprecated because calling Ok.getErrOrThrow() on Ok always fails. It is not deprecated to call this on Result, but on Ok use Ok.get().
getErrOrThrow() - Method in interface nl.markv.result.Result
If the Result is Err, return its content.
getErrOrThrow(String) - Method in class nl.markv.result.Err
If the Result is Err, return its content, otherwise throw WrongResultVariantException with the given message.
getErrOrThrow(String) - Method in class nl.markv.result.Ok
Deprecated.
Marked as deprecated because calling Ok.getErrOrThrow(String) on Ok always fails. It is not deprecated to call this on Result, but on Ok use Ok.get().
getErrOrThrow(String) - Method in interface nl.markv.result.Result
If the Result is Err, return its content, otherwise throw WrongResultVariantException with the given message.
getErrOrThrow(Supplier<RuntimeException>) - Method in class nl.markv.result.Err
If the Result is Err, return its content, otherwise throw the given exception.
getErrOrThrow(Supplier<RuntimeException>) - Method in class nl.markv.result.Ok
Deprecated.
Marked as deprecated because calling Ok.getErrOrThrow(Supplier) on Ok always fails. It is not deprecated to call this on Result, but on Ok use Ok.get().
getErrOrThrow(Supplier<RuntimeException>) - Method in interface nl.markv.result.Result
If the Result is Err, return its content, otherwise throw the given exception.
getOrThrow() - Method in class nl.markv.result.Err
Deprecated.
Marked as deprecated because calling Err.getOrThrow() on Err always fails. It is not deprecated to call this on Result, but on Err use Err.get().
getOrThrow() - Method in class nl.markv.result.Ok
If the Result is Ok, return its content.
getOrThrow() - Method in interface nl.markv.result.Result
If the Result is Ok, return its content.
getOrThrow(String) - Method in class nl.markv.result.Err
Deprecated.
Marked as deprecated because calling Err.getOrThrow(String) on Err always fails. It is not deprecated to call this on Result, but on Err use Err.get().
getOrThrow(String) - Method in class nl.markv.result.Ok
If the Result is Ok, return its content, otherwise throw WrongResultVariantException with the given message.
getOrThrow(String) - Method in interface nl.markv.result.Result
If the Result is Ok, return its content, otherwise throw WrongResultVariantException with the given message.
getOrThrow(Supplier<RuntimeException>) - Method in class nl.markv.result.Err
Deprecated.
Marked as deprecated because calling Err.getOrThrow(Supplier) on Err always fails. It is not deprecated to call this on Result, but on Err use Err.get().
getOrThrow(Supplier<RuntimeException>) - Method in class nl.markv.result.Ok
If the Result is Ok, return its content, otherwise throw the given exception.
getOrThrow(Supplier<RuntimeException>) - Method in interface nl.markv.result.Result
If the Result is Ok, return its content, otherwise throw the given exception.
getUnified() - Method in class nl.markv.result.Err
Get the content of the result, whether it is inside Ok or Err.
getUnified() - Method in class nl.markv.result.Ok
Get the content of the result, whether it is inside Ok or Err.
getUnified() - Method in interface nl.markv.result.Result
Get the content of the result, whether it is inside Ok or Err.

H

hashCode() - Method in class nl.markv.result.Err
 
hashCode() - Method in class nl.markv.result.Ok
 

I

ifEither(Consumer<T>, Consumer<E>) - Method in class nl.markv.result.Err
Call the action for either Ok or Err.
ifEither(Consumer<T>, Consumer<E>) - Method in class nl.markv.result.Ok
Call the action for either Ok or Err.
ifEither(Consumer<T>, Consumer<E>) - Method in interface nl.markv.result.Result
Call the action for either Ok or Err.
ifErr(Consumer<E>) - Method in class nl.markv.result.Err
Run an action on the value of Err.
ifErr(Consumer<E>) - Method in class nl.markv.result.Ok
Run an action on the value of Err.
ifErr(Consumer<E>) - Method in interface nl.markv.result.Result
Run an action on the value of Err.
ifOk(Consumer<T>) - Method in class nl.markv.result.Err
Run an action on the value of Ok.
ifOk(Consumer<T>) - Method in class nl.markv.result.Ok
Run an action on the value of Ok.
ifOk(Consumer<T>) - Method in interface nl.markv.result.Result
Run an action on the value of Ok.
isErr() - Method in interface nl.markv.result.Result
Whether the Result is Err.
isOk() - Method in class nl.markv.result.Err
Whether the Result is Ok.
isOk() - Method in class nl.markv.result.Ok
Whether the Result is Ok.
isOk() - Method in interface nl.markv.result.Result
Whether the Result is Ok.
iterator() - Method in class nl.markv.result.Err
Returns an iterator containing no values, since this result is not Ok.
iterator() - Method in class nl.markv.result.Ok
Returns an iterator containing a single value - the content of this Ok.

M

map(Function<T, U>) - Method in class nl.markv.result.Err
Map the Ok value to a new value of a different type.
map(Function<T, U>) - Method in class nl.markv.result.Ok
Map the Ok value to a new value of a different type.
map(Function<T, U>) - Method in interface nl.markv.result.Result
Map the Ok value to a new value of a different type.
mapErr(Function<E, F>) - Method in class nl.markv.result.Err
Map the Err value to a new value of a different type.
mapErr(Function<E, F>) - Method in class nl.markv.result.Ok
Map the Err value to a new value of a different type.
mapErr(Function<E, F>) - Method in interface nl.markv.result.Result
Map the Err value to a new value of a different type.
matches(Predicate<T>) - Method in class nl.markv.result.Err
If this Result is Ok, the predicate will be tested against its content.
matches(Predicate<T>) - Method in class nl.markv.result.Ok
If this Result is Ok, the predicate will be tested against its content.
matches(Predicate<T>) - Method in interface nl.markv.result.Result
If this Result is Ok, the predicate will be tested against its content.

N

nl.markv.result - package nl.markv.result
 
nl.markv.result.collect - package nl.markv.result.collect
 
none - Static variable in class nl.markv.result.None
 
None - Class in nl.markv.result
A very simple, empty class to represent 'nothing'.

O

of(E) - Static method in class nl.markv.result.Err
Create a new, unsuccessful Result.
of(T) - Static method in class nl.markv.result.Ok
Create a new, successful Result.
ok(T) - Static method in interface nl.markv.result.Result
Create a successful Result.
Ok<T,E> - Class in nl.markv.result
 
okOr(Supplier<T>) - Method in class nl.markv.result.Err
Like Result.okOrNullable(Supplier), but does not allow null input or output.
okOr(Supplier<T>) - Method in class nl.markv.result.Ok
Like Result.okOrNullable(Supplier), but does not allow null input or output.
okOr(Supplier<T>) - Method in interface nl.markv.result.Result
Like Result.okOrNullable(Supplier), but does not allow null input or output.
okOr(T) - Method in class nl.markv.result.Err
Like Result.okOrNullable(T), but does not allow null input or output.
okOr(T) - Method in class nl.markv.result.Ok
Like Result.okOrNullable(T), but does not allow null input or output.
okOr(T) - Method in interface nl.markv.result.Result
Like Result.okOrNullable(T), but does not allow null input or output.
okOrNull() - Method in class nl.markv.result.Err
okOrNull() - Method in class nl.markv.result.Ok
okOrNull() - Method in interface nl.markv.result.Result
 
okOrNullable(Supplier<T>) - Method in class nl.markv.result.Err
If this Result is Ok, return the value.
okOrNullable(Supplier<T>) - Method in class nl.markv.result.Ok
If this Result is Ok, return the value.
okOrNullable(Supplier<T>) - Method in interface nl.markv.result.Result
If this Result is Ok, return the value.
okOrNullable(T) - Method in class nl.markv.result.Err
If this Result is Ok, return the value.
okOrNullable(T) - Method in class nl.markv.result.Ok
If this Result is Ok, return the value.
okOrNullable(T) - Method in interface nl.markv.result.Result
If this Result is Ok, return the value.
or(Supplier<Result<T, F>>) - Method in class nl.markv.result.Err
Returns the current Result if it is Ok, and produces the next result (given by the argument) otherwise.
or(Supplier<Result<T, F>>) - Method in class nl.markv.result.Ok
Returns the current Result if it is Ok, and produces the next result (given by the argument) otherwise.
or(Supplier<Result<T, F>>) - Method in interface nl.markv.result.Result
Returns the current Result if it is Ok, and produces the next result (given by the argument) otherwise.
or(Result<T, F>) - Method in class nl.markv.result.Err
Returns the current Result if it is Ok, and the next one otherwise.
or(Result<T, F>) - Method in class nl.markv.result.Ok
Returns the current Result if it is Ok, and the next one otherwise.
or(Result<T, F>) - Method in interface nl.markv.result.Result
Returns the current Result if it is Ok, and the next one otherwise.

R

recover(Function<E, T>) - Method in class nl.markv.result.Err
If this Result is Ok, return the value.
recover(Function<E, T>) - Method in class nl.markv.result.Ok
If this Result is Ok, return the value.
recover(Function<E, T>) - Method in interface nl.markv.result.Result
If this Result is Ok, return the value.
Result<T,E> - Interface in nl.markv.result
Sometimes a method can either succeed or fail.
ResultCollector - Class in nl.markv.result.collect
Utility class with several methods to create Result-related collectors.
ResultListCollector<T,E> - Class in nl.markv.result.collect
 
ResultListCollector(Function<ResultBuilder<List<T>, E>, Result<List<T>, E>>) - Constructor for class nl.markv.result.collect.ResultListCollector
 
ResultSetCollector<T,E> - Class in nl.markv.result.collect
 
ResultSetCollector(Supplier<Set<T>>, Function<ResultBuilder<Set<T>, E>, Result<Set<T>, E>>) - Constructor for class nl.markv.result.collect.ResultSetCollector
 

S

stream() - Method in class nl.markv.result.Err
Returns a stream containing no values, since this result is not Ok.
stream() - Method in class nl.markv.result.Ok
Returns a stream containing a single value - the content of this Ok.
stream() - Method in interface nl.markv.result.Result
Return a Stream, containing either a single Ok value if this result is successful, or containing nothing if it is an Err.
supplier() - Method in class nl.markv.result.collect.ResultListCollector
 
supplier() - Method in class nl.markv.result.collect.ResultSetCollector
 

T

toList() - Static method in class nl.markv.result.collect.ResultCollector
Collector to collect a stream of Results to a list.
toMutableList() - Static method in class nl.markv.result.collect.ResultCollector
Returns the first failure or a list of all okay values.
toMutableSet() - Static method in class nl.markv.result.collect.ResultCollector
Returns any failure or a list of all okay values.
toOrderedSet() - Static method in class nl.markv.result.collect.ResultCollector
Returns any failure or a list of all okay values.
toSet() - Static method in class nl.markv.result.collect.ResultCollector
Returns any failure or a list of all okay values.
toString() - Method in class nl.markv.result.Err
 
toString() - Method in class nl.markv.result.Ok
 
transpose(List<Result<U, F>>) - Static method in interface nl.markv.result.Result
Given a list of results, if it contains an error, return the first one.
transpose(Optional<Result<U, F>>) - Static method in interface nl.markv.result.Result
Transform Optional of Result to Result of Optional: Some(Ok(x)) to Ok(Some(x)) Some(Err(y)) to Err(y) None to Ok(None) See Result.transpose(Result) for the inverse.
transpose(Set<Result<U, F>>) - Static method in interface nl.markv.result.Result
Given a set of results, if it contains any errors, return the 'first' one ('first' may be arbitrary for many Set implementation).
transpose(Result<Optional<U>, F>) - Static method in interface nl.markv.result.Result
Transform Result of Optional to Optional of Result: Ok(Some(x)) to Some(Ok(x)) Ok(None) to None Err(y) to Some(Err(y)) See Result.transpose(Optional) for the inverse.

W

withoutErr() - Method in class nl.markv.result.Err
Drop the Err value, replacing Err by Optional.empty() and replacing Ok by Optional.of(Object).
withoutErr() - Method in class nl.markv.result.Ok
Drop the Err value, replacing Err by Optional.empty() and replacing Ok by Optional.of(Object).
withoutErr() - Method in interface nl.markv.result.Result
Drop the Err value, replacing Err by Optional.empty() and replacing Ok by Optional.of(Object).
withoutOk() - Method in class nl.markv.result.Err
Drop the Ok value, replacing Err by Optional.of(Object) and replacing Ok by Optional.empty().
withoutOk() - Method in class nl.markv.result.Ok
Drop the Ok value, replacing Err by Optional.of(Object) and replacing Ok by Optional.empty().
withoutOk() - Method in interface nl.markv.result.Result
Drop the Ok value, replacing Err by Optional.of(Object) and replacing Ok by Optional.empty().
WrongResultVariantException - Exception in nl.markv.result
Thrown when code tries to get Ok from a Result that failed, or Err from a Result that succeeded.
WrongResultVariantException(String) - Constructor for exception nl.markv.result.WrongResultVariantException
 
A B C E F G H I M N O R S T W 
All Classes and Interfaces|All Packages|Serialized Form