Index
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 aMaybe<T>, whenTis a supertype ofU. - 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
Maybefrom the result of a computation, returningMaybes.Noneif the computation returns null or throws a particular exception. - fromOptional(Optional<? extends T>) - Static method in class cms.util.maybe.Maybe
-
Create a
Maybefrom anOptionalvalue.
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 exceptionNoMaybeValue.
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
Tor 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
Maybefrom 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
vis present, returns aMaybecontainingf(v), which must be non-null. - thenDo(Consumer<? super T>) - Method in class cms.util.maybe.Maybe
-
Call
conson 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
vis present, returnsf(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
Optionalfrom aMaybe
All Classes and Interfaces|All Packages|Serialized Form