T
- the type Maybe
is wrappingpublic abstract class None<T> extends Object implements io.atlassian.fugue.Maybe<T>
Maybe
.Modifier and Type | Method and Description |
---|---|
static <T> io.atlassian.fugue.Maybe<T> |
becauseOf(String message,
Object... args)
Constructs a
Maybe which will escape with the given message on a call. |
static <T> io.atlassian.fugue.Maybe<T> |
becauseOfException(Exception exception)
Constructs a
Maybe which will escape with the given exception on a call. |
static <T> io.atlassian.fugue.Maybe<T> |
becauseOfNoResult(io.atlassian.fugue.Maybe<?> maybe)
Will cast the given
Maybe to one with the expected parametrisation. |
boolean |
exists(Predicate<? super T> p) |
boolean |
forall(Predicate<? super T> p) |
void |
foreach(io.atlassian.fugue.Effect<? super T> effect) |
T |
getOr(Supplier<? extends T> supplier) |
<B extends T> |
getOrElse(B other) |
T |
getOrElse(Supplier<? extends T> supplier) |
T |
getOrError(Supplier<String> msg) |
T |
getOrNull() |
<X extends Throwable> |
getOrThrow(Supplier<X> xSupplier) |
boolean |
isDefined() |
boolean |
isEmpty() |
@NonNull Iterator<T> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public static <T> io.atlassian.fugue.Maybe<T> becauseOfNoResult(io.atlassian.fugue.Maybe<?> maybe)
Maybe
to one with the expected parametrisation.
This has to be
since it is expected to escape on a Maybe.isEmpty()
Maybe.get()
call.
maybe
- to be casted to the target typeMaybe
adhering to the taget typepublic static <T> io.atlassian.fugue.Maybe<T> becauseOf(String message, Object... args)
Maybe
which will escape with the given message on a Maybe.get()
call.message
- the message used for the escape, may be formatted for application of String.format(String, Object...)
args
- the arguments used for formatting the message, may be nullMaybe
escaping on realizationpublic static <T> io.atlassian.fugue.Maybe<T> becauseOfException(Exception exception)
Maybe
which will escape with the given exception on a Maybe.get()
call.exception
- the exception to be thrown, will be nested in a RuntimeException
if it is checkedpublic T getOrError(Supplier<String> msg)
getOrError
in interface io.atlassian.fugue.Maybe<T>
public T getOr(Supplier<? extends T> supplier)
getOr
in interface io.atlassian.fugue.Maybe<T>
public T getOrElse(Supplier<? extends T> supplier)
getOrElse
in interface io.atlassian.fugue.Maybe<T>
public <X extends Throwable> T getOrThrow(Supplier<X> xSupplier) throws X extends Throwable
public <B extends T> T getOrElse(B other)
getOrElse
in interface io.atlassian.fugue.Maybe<T>
public void foreach(io.atlassian.fugue.Effect<? super T> effect)
foreach
in interface io.atlassian.fugue.Effect.Applicant<T>
public boolean exists(Predicate<? super T> p)
exists
in interface io.atlassian.fugue.Maybe<T>
public boolean forall(Predicate<? super T> p)
forall
in interface io.atlassian.fugue.Maybe<T>
public boolean isEmpty()
isEmpty
in interface io.atlassian.fugue.Maybe<T>
public boolean isDefined()
isDefined
in interface io.atlassian.fugue.Maybe<T>
Copyright © 2003–2019 Atlassian. All rights reserved.