Package com.atlassian.confluence.core
Class MaybeNot<T>
java.lang.Object
com.atlassian.confluence.core.MaybeNot<T>
- Type Parameters:
T
- the typeMaybe
is wrapping
- All Implemented Interfaces:
io.atlassian.fugue.Effect.Applicant<T>
,io.atlassian.fugue.Maybe<T>
,Iterable<T>
Deprecated.
Helps constructing the left, erroneous case of a
Maybe
.- Since:
- 5.2
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> io.atlassian.fugue.Maybe
<T> Deprecated.Constructs aMaybe
which will escape with the given message on a
call.Maybe.get()
static <T> io.atlassian.fugue.Maybe
<T> becauseOfException
(Exception exception) Deprecated.Constructs aMaybe
which will escape with the given exception on a
call.Maybe.get()
static <T> io.atlassian.fugue.Maybe
<T> becauseOfNoResult
(io.atlassian.fugue.Maybe<?> maybe) Deprecated.Will cast the givenMaybe
to one with the expected parametrisation.boolean
Deprecated.boolean
Deprecated.boolean
Deprecated.void
Deprecated.Deprecated.getOrElse
(B other) Deprecated.Deprecated.getOrError
(Supplier<String> msg) Deprecated.Deprecated.getOrThrow
(Supplier<X> xSupplier) Deprecated.boolean
Deprecated.boolean
isEmpty()
Deprecated.iterator()
Deprecated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface io.atlassian.fugue.Maybe
get
-
Method Details
-
becauseOfNoResult
public static <T> io.atlassian.fugue.Maybe<T> becauseOfNoResult(io.atlassian.fugue.Maybe<?> maybe) Deprecated.Will cast the givenMaybe
to one with the expected parametrisation.This has to be
since it is expected to escape on aMaybe.isEmpty()
Maybe.get()
call.- Parameters:
maybe
- to be casted to the target type- Returns:
- the casted
Maybe
adhering to the taget type
-
becauseOf
Deprecated.Constructs aMaybe
which will escape with the given message on a
call.Maybe.get()
- Parameters:
message
- the message used for the escape, may be formatted for application ofString.format(String, Object...)
args
- the arguments used for formatting the message, may be null- Returns:
- the
Maybe
escaping on realization
-
becauseOfException
Deprecated.Constructs aMaybe
which will escape with the given exception on a
call.Maybe.get()
- Parameters:
exception
- the exception to be thrown, will be nested in a
if it is checkedRuntimeException
-
getOrError
Deprecated.- Specified by:
getOrError
in interfaceio.atlassian.fugue.Maybe<T>
-
getOr
Deprecated.- Specified by:
getOr
in interfaceio.atlassian.fugue.Maybe<T>
-
getOrElse
Deprecated.- Specified by:
getOrElse
in interfaceio.atlassian.fugue.Maybe<T>
-
getOrThrow
Deprecated.- Specified by:
getOrThrow
in interfaceio.atlassian.fugue.Maybe<T>
- Throws:
X
-
getOrElse
Deprecated.- Specified by:
getOrElse
in interfaceio.atlassian.fugue.Maybe<T>
-
foreach
Deprecated.- Specified by:
foreach
in interfaceio.atlassian.fugue.Effect.Applicant<T>
-
getOrNull
Deprecated.- Specified by:
getOrNull
in interfaceio.atlassian.fugue.Maybe<T>
-
exists
Deprecated.- Specified by:
exists
in interfaceio.atlassian.fugue.Maybe<T>
-
iterator
Deprecated. -
forall
Deprecated.- Specified by:
forall
in interfaceio.atlassian.fugue.Maybe<T>
-
isEmpty
public boolean isEmpty()Deprecated.- Specified by:
isEmpty
in interfaceio.atlassian.fugue.Maybe<T>
-
isDefined
public boolean isDefined()Deprecated.- Specified by:
isDefined
in interfaceio.atlassian.fugue.Maybe<T>
-
contains
Deprecated.- Specified by:
contains
in interfaceio.atlassian.fugue.Maybe<T>
-
None