C F G I M N O S T
All Classes All Packages
All Classes All Packages
All Classes All Packages
C
- cast(Maybe<U>) - Static method in class cms.util.maybe.Maybe
-
Convert a
Maybe<U>
to aMaybe<T>
, whenT
is a supertype ofU
. - cms.util.maybe - package cms.util.maybe
F
- from(T) - Static method in class cms.util.maybe.Maybe
-
Create a Maybe from a possibly null value v.
- fromOptional(Optional<T>) - Static method in class cms.util.maybe.Maybe
-
Create a
Maybe
from anOptional
value.
G
- get() - Method in class cms.util.maybe.Maybe
-
Returns the contained value, if present.
- getOptional(Optional<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
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 in cms.util.maybe
-
A checked exception that forces the programmer to handle the possibility of empty maybes.
- NoMaybeValue() - Constructor for exception 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<T>) - Method in class cms.util.maybe.Maybe
-
Returns the contained value, if any; otherwise, returns
other.get()
. - orElseMaybe(Supplier<Maybe<T>>) - Method in class cms.util.maybe.Maybe
-
Returns this if a value is contained; otherwise, returns
other.get()
.
S
T
- theException - Static variable in exception cms.util.maybe.NoMaybeValue
- then(Function<T, U>) - Method in class cms.util.maybe.Maybe
-
If a value
v
is present, returns aMaybe
containingf(v)
, which must be non-null. - thenDo(Consumer<T>) - Method in class cms.util.maybe.Maybe
-
Call
cons
on the contained value, if any. - thenMaybe(Function<T, Maybe<U>>) - Method in class cms.util.maybe.Maybe
-
If a value
v
is present, returnsf(v)
. - toOptional() - Method in class cms.util.maybe.Maybe
-
Create an
Optional
from aMaybe
All Classes All Packages