Index

A C E F G H I K M N O P Q R S T U V W 
All Classes and Interfaces|All Packages|Serialized Form

A

and(Result<U, E>) - Method in class org.storynode.pigeon.result.Err
Returns res if the result is Ok, otherwise returns the Err value of this.
and(Result<U, E>) - Method in class org.storynode.pigeon.result.Ok
Returns res if the result is Ok, otherwise returns the Err value of this.
and(Result<U, E>) - Method in class org.storynode.pigeon.result.Result
Returns res if the result is Ok, otherwise returns the Err value of this.
andThen(Function<T, Result<U, E>>) - Method in class org.storynode.pigeon.result.Err
Like Result.and(Result) but lazily evaluated.
andThen(Function<T, Result<U, E>>) - Method in class org.storynode.pigeon.result.Ok
Like Result.and(Result) but lazily evaluated.
andThen(Function<T, Result<U, E>>) - Method in class org.storynode.pigeon.result.Result
Like Result.and(Result) but lazily evaluated.
Assertions - Class in org.storynode.pigeon.assertion
Assertions class.
Assertions() - Constructor for class org.storynode.pigeon.assertion.Assertions
 
assertThat(Option<T>) - Static method in class org.storynode.pigeon.assertion.Assertions
assertThat.
assertThat(Result<T, E>) - Static method in class org.storynode.pigeon.assertion.Assertions
assertThat.
at(int) - Method in class org.storynode.pigeon.tuple.Pair
at(int) - Method in class org.storynode.pigeon.tuple.Quartet
at(int) - Method in class org.storynode.pigeon.tuple.Quintet
at(int) - Method in class org.storynode.pigeon.tuple.Triplet

C

cardinality() - Method in class org.storynode.pigeon.tuple.Pair
cardinality() - Method in class org.storynode.pigeon.tuple.Quartet
cardinality() - Method in class org.storynode.pigeon.tuple.Quintet
cardinality() - Method in class org.storynode.pigeon.tuple.Triplet
clamp(double, double, double) - Static method in class org.storynode.pigeon.math.Math
Clamps a value between a min and max value (inclusive)
clamp(float, float, float) - Static method in class org.storynode.pigeon.math.Math
Clamps a value between a min and max value (inclusive)
clamp(int, int, int) - Static method in class org.storynode.pigeon.math.Math
Clamps a value between a min and max value (inclusive)
Construct by execution - Search tag in class org.storynode.pigeon.result.Result
Section

E

enumerate() - Method in class org.storynode.pigeon.tuple.Tuple
Enumerates the items in this tuple
equals(Object) - Method in class org.storynode.pigeon.option.None
equals(Object) - Method in class org.storynode.pigeon.option.Some
equals(Object) - Method in class org.storynode.pigeon.result.Result
equals(Object) - Method in class org.storynode.pigeon.tuple.Tuple
err(E) - Static method in class org.storynode.pigeon.result.Result
Constructs an error variant of a Result
Err<T,E> - Class in org.storynode.pigeon.result
Result variant for errors.
Err(E) - Constructor for class org.storynode.pigeon.result.Err
A variant of Result that indicates an error value
error(E) - Static method in class org.storynode.pigeon.result.Result
Constructs an error variant of a Result
Example - Search tag in org.storynode.pigeon.result.Result.map(Function<? super T, ? extends U>)
Section
Example - Search tag in org.storynode.pigeon.result.Result.map(Function<? super T, ? extends U>)
Section
Example - Search tag in org.storynode.pigeon.result.Result.map(Function<? super T, ? extends U>)
Section
Examples - Search tag in class org.storynode.pigeon.result.Result
Section
executing(Runnable) - Static method in class org.storynode.pigeon.function.NeverThrow
Runs the given function and returns a Result describing its outcome
executing(ThrowingSupplier<T>) - Static method in class org.storynode.pigeon.function.NeverThrow
Runs the given function and returns a Result with the function returned value

F

fifth() - Method in class org.storynode.pigeon.tuple.Quintet
The fifth element of the tuple
filter(Predicate<? super T>) - Method in class org.storynode.pigeon.option.None
If a value is present, and the value matches the given predicate, returns an Option describing the value, otherwise returns an empty Option.
filter(Predicate<? super T>) - Method in class org.storynode.pigeon.option.Option
If a value is present, and the value matches the given predicate, returns an Option describing the value, otherwise returns an empty Option.
filter(Predicate<? super T>) - Method in class org.storynode.pigeon.option.Some
If a value is present, and the value matches the given predicate, returns an Option describing the value, otherwise returns an empty Option.
first() - Method in class org.storynode.pigeon.tuple.Pair
The first element of the tuple
first() - Method in class org.storynode.pigeon.tuple.Quartet
The first element of the tuple
first() - Method in class org.storynode.pigeon.tuple.Quintet
The first element of the tuple
first() - Method in class org.storynode.pigeon.tuple.Triplet
The first element of the tuple
flatMap(Function<? super T, ? extends Option<? extends U>>) - Method in class org.storynode.pigeon.option.Some
If a value is present, returns the result of applying the given Optional-bearing mapping function to the value, otherwise returns an empty Optional.
flatMap(Function<? super T, ? extends Result<U, E>>) - Method in class org.storynode.pigeon.result.Err
Like Option.map(Function) but does not re-wrap the result of the provided mapping function to a Result
flatMap(Function<? super T, ? extends Result<U, E>>) - Method in class org.storynode.pigeon.result.Ok
Like Option.map(Function) but does not re-wrap the result of the provided mapping function to a Result
flatMap(Function<? super T, ? extends Result<U, E>>) - Method in class org.storynode.pigeon.result.Result
Like Option.map(Function) but does not re-wrap the result of the provided mapping function to a Result
flatMap(Function<? super T, ? extends Option<? extends U>>) - Method in class org.storynode.pigeon.option.None
If a value is present, returns the result of applying the given Optional-bearing mapping function to the value, otherwise returns an empty Optional.
flatMap(Function<? super T, ? extends Option<? extends U>>) - Method in class org.storynode.pigeon.option.Option
If a value is present, returns the result of applying the given Optional-bearing mapping function to the value, otherwise returns an empty Optional.
fourth() - Method in class org.storynode.pigeon.tuple.Quartet
The fourth element of the tuple
fourth() - Method in class org.storynode.pigeon.tuple.Quintet
The fourth element of the tuple
from(Wrapped<T>) - Static method in class org.storynode.pigeon.wrap.Metadata
Tries to create a Metadata instance from another Wrapped value.
from(Wrapped<T>, Map<Object, Object>) - Static method in class org.storynode.pigeon.wrap.Metadata
Tries to create a Metadata instance from another Wrapped value.

G

get() - Method in interface org.storynode.pigeon.protocol.ThrowingSupplier
get(BiFunction<String, Exception, RuntimeException>) - Method in interface org.storynode.pigeon.protocol.ThrowingSupplier
get.
getWithException() - Method in interface org.storynode.pigeon.protocol.ThrowingSupplier
Gets the supplied value, throwing any caught exception back to the caller

H

hashCode() - Method in class org.storynode.pigeon.option.None
hashCode() - Method in class org.storynode.pigeon.option.Some
hashCode() - Method in class org.storynode.pigeon.tuple.Pair
hashCode() - Method in class org.storynode.pigeon.tuple.Quartet
hashCode() - Method in class org.storynode.pigeon.tuple.Quintet
hashCode() - Method in class org.storynode.pigeon.tuple.Triplet

I

ifError(Consumer<E>) - Method in class org.storynode.pigeon.result.Result
Executes the provided function if this contains an error
ifOk(Consumer<T>) - Method in class org.storynode.pigeon.result.Result
Executes the provided function if this contains a value
ifOkOrElse(Consumer<T>, Consumer<E>) - Method in class org.storynode.pigeon.result.Ok
Executes whenOk if this contains a value, whenError otherwise.
ifOkOrElse(Consumer<T>, Consumer<E>) - Method in class org.storynode.pigeon.result.Err
Executes whenOk if this contains a value, whenError otherwise.
ifOkOrElse(Consumer<T>, Consumer<E>) - Method in class org.storynode.pigeon.result.Result
Executes whenOk if this contains a value, whenError otherwise.
ifPresent(Consumer<T>) - Method in class org.storynode.pigeon.option.Some
Executes func if this is Some, consuming the contained value.
ifPresent(Consumer<T>) - Method in class org.storynode.pigeon.option.None
Executes func if this is Some, consuming the contained value.
ifPresent(Consumer<T>) - Method in class org.storynode.pigeon.option.Option
Executes func if this is Some, consuming the contained value.
ifPresentOrElse(Consumer<T>, Runnable) - Method in class org.storynode.pigeon.option.Some
Executes whenPresent if this is Some, consuming the contained value, or runs otherwise if this is None
ifPresentOrElse(Consumer<T>, Runnable) - Method in class org.storynode.pigeon.option.None
Executes whenPresent if this is Some, consuming the contained value, or runs otherwise if this is None
ifPresentOrElse(Consumer<T>, Runnable) - Method in class org.storynode.pigeon.option.Option
Executes whenPresent if this is Some, consuming the contained value, or runs otherwise if this is None
INSTANCE - Static variable in class org.storynode.pigeon.option.None
Constant INSTANCE
isEmpty() - Method in class org.storynode.pigeon.assertion.OptionAssert
isEmpty.
isErr() - Method in class org.storynode.pigeon.result.Result
Whether this Result is an error
isErrAnd(Predicate<E>) - Method in class org.storynode.pigeon.result.Result
Returns true if the result contains an error and that error satisfies a predicate
isError() - Method in class org.storynode.pigeon.assertion.ResultAssert
Asserts that the variant of the Result is Err
isNone() - Method in class org.storynode.pigeon.assertion.OptionAssert
isNone.
isNone() - Method in class org.storynode.pigeon.option.Option
Whether this option contains a value or not
isNotEmpty() - Method in class org.storynode.pigeon.assertion.OptionAssert
isNotEmpty.
isOk() - Method in class org.storynode.pigeon.assertion.ResultAssert
Asserts that the variant of the Result is Ok
isOk() - Method in class org.storynode.pigeon.result.Err
Whether this Result is ok, meaning it contains a value and not an error
isOk() - Method in class org.storynode.pigeon.result.Ok
Whether this Result is ok, meaning it contains a value and not an error
isOk() - Method in class org.storynode.pigeon.result.Result
Whether this Result is ok, meaning it contains a value and not an error
isOkAnd(Predicate<T>) - Method in class org.storynode.pigeon.result.Result
Returns true if the result contains a value and that value satisfies a predicate
isSome() - Method in class org.storynode.pigeon.assertion.OptionAssert
isSome.
isSome() - Method in class org.storynode.pigeon.option.None
Whether this option contains a value or not
isSome() - Method in class org.storynode.pigeon.option.Option
Whether this option contains a value or not
isSome() - Method in class org.storynode.pigeon.option.Some
Whether this option contains a value or not

K

Known variant construction - Search tag in class org.storynode.pigeon.result.Result
Section

M

map(Function<? super T, ? extends U>) - Method in class org.storynode.pigeon.result.Err
Maps a Result<T, E> to Result<U, E> by applying a function to a contained value, leaving a result that contains an error untouched.
map(Function<? super T, ? extends U>) - Method in class org.storynode.pigeon.result.Ok
Maps a Result<T, E> to Result<U, E> by applying a function to a contained value, leaving a result that contains an error untouched.
map(Function<? super T, ? extends U>) - Method in class org.storynode.pigeon.result.Result
Maps a Result<T, E> to Result<U, E> by applying a function to a contained value, leaving a result that contains an error untouched.
map(Function<T, U>) - Method in class org.storynode.pigeon.option.None
If a value is present, returns an Option describing (as if by Option.some(T)) the result of applying the given mapping function to the value, otherwise returns an empty Option.
map(Function<T, U>) - Method in class org.storynode.pigeon.option.Option
If a value is present, returns an Option describing (as if by Option.some(T)) the result of applying the given mapping function to the value, otherwise returns an empty Option.
map(Function<T, U>) - Method in class org.storynode.pigeon.option.Some
If a value is present, returns an Option describing (as if by Option.some(T)) the result of applying the given mapping function to the value, otherwise returns an empty Option.
mapError(Function<? super E, ? extends U>) - Method in class org.storynode.pigeon.result.Err
Maps a Result<T, E> to Result<T, U> by applying a function to a contained error, leaving a result that contains a value untouched.
mapError(Function<? super E, ? extends U>) - Method in class org.storynode.pigeon.result.Ok
Maps a Result<T, E> to Result<T, U> by applying a function to a contained error, leaving a result that contains a value untouched.
mapError(Function<? super E, ? extends U>) - Method in class org.storynode.pigeon.result.Result
Maps a Result<T, E> to Result<T, U> by applying a function to a contained error, leaving a result that contains a value untouched.
Math - Class in org.storynode.pigeon.math
Math utilities
Math() - Constructor for class org.storynode.pigeon.math.Math
 
Metadata<T> - Class in org.storynode.pigeon.wrap
Wraps a value associating it with arbitrary metadata
Metadata(T) - Constructor for class org.storynode.pigeon.wrap.Metadata
Creates a Metadata with a value and no metadata associated
Metadata(T, Map<Object, Object>) - Constructor for class org.storynode.pigeon.wrap.Metadata
Creates a Metadata with a value and associated metadata

N

NeverThrow - Class in org.storynode.pigeon.function
Static functions for exception-less execution
NeverThrow() - Constructor for class org.storynode.pigeon.function.NeverThrow
 
none() - Static method in class org.storynode.pigeon.option.Option
Creates an empty (None) Option
None<T> - Class in org.storynode.pigeon.option
Represents an Option with no value
None() - Constructor for class org.storynode.pigeon.option.None
Creates an option with no value in it

O

of(Supplier<T>) - Static method in class org.storynode.pigeon.option.Option
Creates a new Option with some value in it.
of(ThrowingSupplier<T>) - Static method in class org.storynode.pigeon.result.Result
Constructs a new Result by using the provided function return value.
of(T) - Static method in class org.storynode.pigeon.option.Option
Creates a new Option with some value in it.
of(T1, T2) - Static method in class org.storynode.pigeon.tuple.Tuple
Creates a Tuple of two elements
of(T1, T2, T3) - Static method in class org.storynode.pigeon.tuple.Tuple
Creates a Tuple of three elements
of(T1, T2, T3, T4) - Static method in class org.storynode.pigeon.tuple.Tuple
Creates a Tuple of four elements
of(T1, T2, T3, T4, T5) - Static method in class org.storynode.pigeon.tuple.Tuple
Creates a Tuple of five elements
ok(T) - Static method in class org.storynode.pigeon.result.Result
Constructs an ok variant of a Result.
Ok<T,E> - Class in org.storynode.pigeon.result
Result variant for ok values.
Ok(T) - Constructor for class org.storynode.pigeon.result.Ok
A variant of Result that indicates a success value
Option<T> - Class in org.storynode.pigeon.option
Describes a value that can be Some value or None.
Option() - Constructor for class org.storynode.pigeon.option.Option
 
OptionAssert<T> - Class in org.storynode.pigeon.assertion
OptionAssert class.
OptionAssert(Option<T>) - Constructor for class org.storynode.pigeon.assertion.OptionAssert
Constructor for OptionAssert.
or(Supplier<? extends Option<? extends T>>) - Method in class org.storynode.pigeon.option.None
If a value is present, returns an Option describing the value, otherwise returns an Option produced by the given supplying function
or(Supplier<? extends Option<? extends T>>) - Method in class org.storynode.pigeon.option.Option
If a value is present, returns an Option describing the value, otherwise returns an Option produced by the given supplying function
or(Supplier<? extends Option<? extends T>>) - Method in class org.storynode.pigeon.option.Some
If a value is present, returns an Option describing the value, otherwise returns an Option produced by the given supplying function
orElse(T) - Method in class org.storynode.pigeon.option.None
If a value is present, returns the value, otherwise returns other.
orElse(T) - Method in class org.storynode.pigeon.option.Option
If a value is present, returns the value, otherwise returns other.
orElse(T) - Method in class org.storynode.pigeon.option.Some
If a value is present, returns the value, otherwise returns other.
orElse(T) - Method in class org.storynode.pigeon.result.Err
Unwraps the contained value, or returns a default one if this contains an error
orElse(T) - Method in class org.storynode.pigeon.result.Ok
Unwraps the contained value, or returns a default one if this contains an error
orElse(T) - Method in class org.storynode.pigeon.result.Result
Unwraps the contained value, or returns a default one if this contains an error
orElseGet(Supplier<T>) - Method in class org.storynode.pigeon.option.None
If a value is present, returns the value, otherwise returns the result produced by the supplying function.
orElseGet(Supplier<T>) - Method in class org.storynode.pigeon.option.Option
If a value is present, returns the value, otherwise returns the result produced by the supplying function.
orElseGet(Supplier<T>) - Method in class org.storynode.pigeon.option.Some
If a value is present, returns the value, otherwise returns the result produced by the supplying function.
orElseGet(Supplier<T>) - Method in class org.storynode.pigeon.result.Err
Unwraps the contained value, or returns a default one if this contains an error
orElseGet(Supplier<T>) - Method in class org.storynode.pigeon.result.Ok
Unwraps the contained value, or returns a default one if this contains an error
orElseGet(Supplier<T>) - Method in class org.storynode.pigeon.result.Result
Unwraps the contained value, or returns a default one if this contains an error
orElseThrow() - Method in class org.storynode.pigeon.option.None
If a value is present returns that value, otherwise throws NoSuchElementException.
orElseThrow() - Method in class org.storynode.pigeon.option.Option
If a value is present returns that value, otherwise throws NoSuchElementException.
orElseThrow() - Method in class org.storynode.pigeon.option.Some
If a value is present returns that value, otherwise throws NoSuchElementException.
orElseThrow(Supplier<E>) - Method in class org.storynode.pigeon.option.None
If a value is present returns that value, otherwise throws the supplied Throwable.
orElseThrow(Supplier<E>) - Method in class org.storynode.pigeon.option.Option
If a value is present returns that value, otherwise throws the supplied Throwable.
orElseThrow(Supplier<E>) - Method in class org.storynode.pigeon.option.Some
If a value is present returns that value, otherwise throws the supplied Throwable.
org.storynode.pigeon.assertion - package org.storynode.pigeon.assertion
Assertions for Option, Result and other types
org.storynode.pigeon.error - package org.storynode.pigeon.error
Error types
org.storynode.pigeon.function - package org.storynode.pigeon.function
Static classes exposing functions
org.storynode.pigeon.math - package org.storynode.pigeon.math
 
org.storynode.pigeon.option - package org.storynode.pigeon.option
Optional, non-null, non-throwing wrapper types
org.storynode.pigeon.protocol - package org.storynode.pigeon.protocol
 
org.storynode.pigeon.result - package org.storynode.pigeon.result
Types representing the outcome of some operations
org.storynode.pigeon.tuple - package org.storynode.pigeon.tuple
Tuples are heterogeneous collections of fixed size from zero to n elements, in order.
org.storynode.pigeon.wrap - package org.storynode.pigeon.wrap
Generic wrapper types

P

Pair<T1,T2> - Class in org.storynode.pigeon.tuple
Pair class.
Pair(T1, T2) - Constructor for class org.storynode.pigeon.tuple.Pair
Constructor for Pair.

Q

Quartet<T1,T2,T3,T4> - Class in org.storynode.pigeon.tuple
Quartet class.
Quartet(T1, T2, T3, T4) - Constructor for class org.storynode.pigeon.tuple.Quartet
Constructor for Quartet.
Quintet<T1,T2,T3,T4,T5> - Class in org.storynode.pigeon.tuple
Quintet class.
Quintet(T1, T2, T3, T4, T5) - Constructor for class org.storynode.pigeon.tuple.Quintet
Constructor for Quintet.

R

Result<T,E> - Class in org.storynode.pigeon.result
A type representing the outcome of some operation, which value can be some value or some error but not neither nor both at the same time.
Result() - Constructor for class org.storynode.pigeon.result.Result
 
ResultAssert<T,E> - Class in org.storynode.pigeon.assertion
ResultAssert class.
ResultAssert(Result<T, E>) - Constructor for class org.storynode.pigeon.assertion.ResultAssert
Constructor for ResultAssert.
returns(U, Function<Option<T>, U>) - Method in class org.storynode.pigeon.assertion.OptionAssert
returns.
returns(U, Function<Result<T, E>, U>) - Method in class org.storynode.pigeon.assertion.ResultAssert
Asserts that the provided function returns expected

S

SafelyWrapped<T> - Interface in org.storynode.pigeon.protocol
SafelyWrapped interface.
second() - Method in class org.storynode.pigeon.tuple.Pair
The second element of the tuple
second() - Method in class org.storynode.pigeon.tuple.Quartet
The second element of the tuple
second() - Method in class org.storynode.pigeon.tuple.Quintet
The second element of the tuple
second() - Method in class org.storynode.pigeon.tuple.Triplet
The second element of the tuple
some(T) - Static method in class org.storynode.pigeon.option.Option
Creates a new Option with some value in it.
Some<T> - Class in org.storynode.pigeon.option
An Option with some value in it.
Some(T) - Constructor for class org.storynode.pigeon.option.Some
Creates an Option that has a non-null value in it
stream() - Method in class org.storynode.pigeon.option.None
Streams the contained value, if any.
stream() - Method in class org.storynode.pigeon.option.Option
Streams the contained value, if any.
stream() - Method in class org.storynode.pigeon.option.Some
Streams the contained value, if any.

T

third() - Method in class org.storynode.pigeon.tuple.Quartet
The third element of the tuple
third() - Method in class org.storynode.pigeon.tuple.Quintet
The third element of the tuple
third() - Method in class org.storynode.pigeon.tuple.Triplet
The third element of the tuple
ThrowingSupplier<T> - Interface in org.storynode.pigeon.protocol
A Supplier that allows code to throw checked exceptions
toString() - Method in class org.storynode.pigeon.option.None
toString() - Method in class org.storynode.pigeon.option.Some
toString() - Method in class org.storynode.pigeon.tuple.Pair
toString() - Method in class org.storynode.pigeon.tuple.Quartet
toString() - Method in class org.storynode.pigeon.tuple.Quintet
toString() - Method in class org.storynode.pigeon.tuple.Triplet
toTuple() - Method in class org.storynode.pigeon.result.Result
Converts this result to a Pair tuple having the value and the error as fields
toTuple() - Method in class org.storynode.pigeon.wrap.Metadata
A Pair composed by the value and its metadata map
Triplet<T1,T2,T3> - Class in org.storynode.pigeon.tuple
Triplet class.
Triplet(T1, T2, T3) - Constructor for class org.storynode.pigeon.tuple.Triplet
Constructor for Triplet.
tryUnwrap() - Method in interface org.storynode.pigeon.protocol.SafelyWrapped
The non-throwing variant of Wrapped.unwrap().
Tuple - Class in org.storynode.pigeon.tuple
A tuple may be defined in many ways, but simply speaking it's a finite, heterogeneous sequence of elements.
Tuple() - Constructor for class org.storynode.pigeon.tuple.Tuple
 

U

unwrap() - Method in class org.storynode.pigeon.option.None
Gets the wrapped value.
unwrap() - Method in class org.storynode.pigeon.option.Some
Gets the wrapped value.
unwrap() - Method in interface org.storynode.pigeon.protocol.Wrapped
Gets the wrapped value.
unwrap() - Method in class org.storynode.pigeon.result.Err
Unwraps and return the inner value, if present.
unwrap() - Method in class org.storynode.pigeon.result.Ok
Unwraps and return the inner value, if present.
unwrap() - Method in class org.storynode.pigeon.result.Result
Unwraps and return the inner value, if present.
unwrap() - Method in class org.storynode.pigeon.wrap.Metadata
Gets the wrapped value.
unwrapError() - Method in class org.storynode.pigeon.result.Err
Unwraps and return the inner error, if present.
unwrapError() - Method in class org.storynode.pigeon.result.Ok
Unwraps and return the inner error, if present.
unwrapError() - Method in class org.storynode.pigeon.result.Result
Unwraps and return the inner error, if present.
UnwrapException - Exception Class in org.storynode.pigeon.error
UnwrapException class.
UnwrapException(String) - Constructor for exception class org.storynode.pigeon.error.UnwrapException
Constructor for UnwrapException.
unwraps(T) - Method in class org.storynode.pigeon.assertion.ResultAssert
Asserts that the variant of the Result is Ok

V

value() - Method in class org.storynode.pigeon.option.Some
Returns the contained value

W

Why this and not java.util.Optional? - Search tag in class org.storynode.pigeon.option.Option
Section
Wrapped<T> - Interface in org.storynode.pigeon.protocol
A type that serves as a wrapper for a given value that allows accessing that value.
A C E F G H I K M N O P Q R S T U V W 
All Classes and Interfaces|All Packages|Serialized Form