Index

C F G I M N O S T 
All Classes and Interfaces|All Packages|Serialized Form

C

cast(Maybe<U>) - Static method in class cms.util.maybe.Maybe
Convert a Maybe<U> to a Maybe<T>, when T is a supertype of U.
cms.util.maybe - package cms.util.maybe
 
containsAll(Collection<?>) - Method in class cms.util.maybe.Maybe
 
create() - Method in exception class cms.util.maybe.NoMaybeValue
 

F

from(T) - Static method in class cms.util.maybe.Maybe
Create a Maybe from a possibly null value v.
fromCatching(ThrowingSupplier<T, E>, Class<? super E>) - Static method in class cms.util.maybe.Maybe
Create a Maybe from the result of a computation, returning Maybes.None if the computation returns null or throws a particular exception.
fromOptional(Optional<? extends T>) - Static method in class cms.util.maybe.Maybe
Create a Maybe from an Optional value.

G

get() - Method in class cms.util.maybe.Maybe
Returns the contained value, if present.
get() - Method in interface cms.util.maybe.ThrowingSupplier
 
getOptional(Optional<? extends T>) - Static method in class cms.util.maybe.Maybe
Get the value in an Optional, if present; otherwise throw the checked exception NoMaybeValue.

I

isPresent() - Method in class cms.util.maybe.Maybe
Returns whether a value is contained in this Maybe.
iterator() - Method in class cms.util.maybe.Maybe
Provide an iterator that yields either one T or none, depending.

M

Maybe<T> - Class in cms.util.maybe
An object that may contain a value of type T.
Maybe() - Constructor for class cms.util.maybe.Maybe
 

N

NoMaybeValue - Exception Class in cms.util.maybe
A checked exception that forces the programmer to handle the possibility of empty maybes.
NoMaybeValue() - Constructor for exception class cms.util.maybe.NoMaybeValue
 
none() - Static method in class cms.util.maybe.Maybe
Returns an empty Maybe.

O

orElse(T) - Method in class cms.util.maybe.Maybe
Returns the contained value, if any; otherwise, returns other.
orElseGet(Supplier<? extends T>) - Method in class cms.util.maybe.Maybe
Returns the contained value, if any; otherwise, returns other.get().
orElseMaybe(Supplier<? extends Maybe<? extends T>>) - Method in class cms.util.maybe.Maybe
Returns this if a value is contained; otherwise, returns other.get().
orElseThrow(Supplier<E>) - Method in class cms.util.maybe.Maybe
Returns the contained value, if any; otherwise, throws the specified exception.

S

some(T) - Static method in class cms.util.maybe.Maybe
Creates a Maybe from a non-null argument.

T

theException - Static variable in exception class cms.util.maybe.NoMaybeValue
 
then(Function<? super T, ? extends U>) - Method in class cms.util.maybe.Maybe
If a value v is present, returns a Maybe containing f(v), which must be non-null.
thenDo(Consumer<? super T>) - Method in class cms.util.maybe.Maybe
Call cons on the contained value, if any.
thenElse(Consumer<? super T>, Runnable) - Method in class cms.util.maybe.Maybe
If a value is contained, run consThen on the value; otherwise run procElse
thenMaybe(Function<? super T, ? extends Maybe<? extends U>>) - Method in class cms.util.maybe.Maybe
If a value v is present, returns f(v).
ThrowingSupplier<T,E> - Interface in cms.util.maybe
A function that takes no arguments and either returns a value of type <T> or throws an exception of type <E>
toOptional() - Method in class cms.util.maybe.Maybe
Create an Optional from a Maybe
C F G I M N O S T 
All Classes and Interfaces|All Packages|Serialized Form