Package com.atlassian.confluence.core
Class MaybeNot<T>
java.lang.Object
com.atlassian.confluence.core.MaybeNot<T>
- Type Parameters:
T- the typeMaybeis wrapping
- All Implemented Interfaces:
com.atlassian.fugue.Effect.Applicant<T>,com.atlassian.fugue.Maybe<T>,Iterable<T>
@Deprecated
public abstract class MaybeNot<T>
extends Object
implements com.atlassian.fugue.Maybe<T>
Deprecated.
Helps constructing the left, erroneous case of a
Maybe.- Since:
- 5.2
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> com.atlassian.fugue.Maybe<T>Deprecated.Constructs aMaybewhich will escape with the given message on acall.Maybe.get()static <T> com.atlassian.fugue.Maybe<T>becauseOfException(Exception exception) Deprecated.Constructs aMaybewhich will escape with the given exception on acall.Maybe.get()static <T> com.atlassian.fugue.Maybe<T>becauseOfNoResult(com.atlassian.fugue.Maybe<?> maybe) Deprecated.Will cast the givenMaybeto one with the expected parametrisation.booleanDeprecated.booleanDeprecated.voidDeprecated.getOrElse(B other) Deprecated.Deprecated.getOrError(com.google.common.base.Supplier<String> msg) Deprecated.Deprecated.getOrThrow(com.google.common.base.Supplier<X> xSupplier) Deprecated.booleanDeprecated.booleanisEmpty()Deprecated.iterator()Deprecated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface com.atlassian.fugue.Maybe
get
-
Method Details
-
becauseOfNoResult
public static <T> com.atlassian.fugue.Maybe<T> becauseOfNoResult(com.atlassian.fugue.Maybe<?> maybe) Deprecated.Will cast the givenMaybeto 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
Maybeadhering to the taget type
-
becauseOf
Deprecated.Constructs aMaybewhich will escape with the given message on acall.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
Maybeescaping on realization
-
becauseOfException
Deprecated.Constructs aMaybewhich will escape with the given exception on acall.Maybe.get()- Parameters:
exception- the exception to be thrown, will be nested in aif it is checkedRuntimeException
-
getOrError
Deprecated.- Specified by:
getOrErrorin interfacecom.atlassian.fugue.Maybe<T>
-
getOrElse
Deprecated.- Specified by:
getOrElsein interfacecom.atlassian.fugue.Maybe<T>
-
getOrThrow
Deprecated. -
getOrElse
Deprecated.- Specified by:
getOrElsein interfacecom.atlassian.fugue.Maybe<T>
-
foreach
Deprecated.- Specified by:
foreachin interfacecom.atlassian.fugue.Effect.Applicant<T>
-
getOrNull
Deprecated.- Specified by:
getOrNullin interfacecom.atlassian.fugue.Maybe<T>
-
exists
Deprecated.- Specified by:
existsin interfacecom.atlassian.fugue.Maybe<T>
-
iterator
Deprecated. -
forall
Deprecated.- Specified by:
forallin interfacecom.atlassian.fugue.Maybe<T>
-
isEmpty
public boolean isEmpty()Deprecated.- Specified by:
isEmptyin interfacecom.atlassian.fugue.Maybe<T>
-
isDefined
public boolean isDefined()Deprecated.- Specified by:
isDefinedin interfacecom.atlassian.fugue.Maybe<T>
-
None