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:
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.since 7.0.1. UseNone
Helps constructing the left, erroneous case of a
.Maybe
- Since:
- 5.2
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T> com.atlassian.fugue.Maybe<T>
becauseOf(String message, Object... args)
Deprecated.Constructs aMaybe
which will escape with the given message on a
call.Maybe.get()
static <T> com.atlassian.fugue.Maybe<T>
becauseOfException(Exception exception)
Deprecated.Constructs aMaybe
which will escape with the given exception on a
call.Maybe.get()
static <T> com.atlassian.fugue.Maybe<T>
becauseOfNoResult(com.atlassian.fugue.Maybe<?> maybe)
Deprecated.Will cast the givenMaybe
to one with the expected parametrisation.boolean
exists(com.google.common.base.Predicate<? super T> p)
Deprecated.boolean
forall(com.google.common.base.Predicate<? super T> p)
Deprecated.void
foreach(com.atlassian.fugue.Effect<? super T> effect)
Deprecated.<B extends T>
TgetOrElse(B other)
Deprecated.T
getOrElse(com.google.common.base.Supplier<? extends T> supplier)
Deprecated.T
getOrError(com.google.common.base.Supplier<String> msg)
Deprecated.T
getOrNull()
Deprecated.<X extends Throwable>
TgetOrThrow(com.google.common.base.Supplier<X> xSupplier)
Deprecated.boolean
isDefined()
Deprecated.boolean
isEmpty()
Deprecated.@NonNull Iterator<T>
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
-
-
-
-
Method Detail
-
becauseOfNoResult
public static <T> com.atlassian.fugue.Maybe<T> becauseOfNoResult(com.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
public static <T> com.atlassian.fugue.Maybe<T> becauseOf(String message, Object... args)
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
public static <T> com.atlassian.fugue.Maybe<T> becauseOfException(Exception exception)
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
public T getOrError(com.google.common.base.Supplier<String> msg)
Deprecated.- Specified by:
getOrError
in interfacecom.atlassian.fugue.Maybe<T>
-
getOrElse
public T getOrElse(com.google.common.base.Supplier<? extends T> supplier)
Deprecated.- Specified by:
getOrElse
in interfacecom.atlassian.fugue.Maybe<T>
-
getOrThrow
public <X extends Throwable> T getOrThrow(com.google.common.base.Supplier<X> xSupplier) throws X extends Throwable
Deprecated.
-
getOrElse
public <B extends T> T getOrElse(B other)
Deprecated.- Specified by:
getOrElse
in interfacecom.atlassian.fugue.Maybe<T>
-
foreach
public void foreach(com.atlassian.fugue.Effect<? super T> effect)
Deprecated.- Specified by:
foreach
in interfacecom.atlassian.fugue.Effect.Applicant<T>
-
getOrNull
public T getOrNull()
Deprecated.- Specified by:
getOrNull
in interfacecom.atlassian.fugue.Maybe<T>
-
exists
public boolean exists(com.google.common.base.Predicate<? super T> p)
Deprecated.- Specified by:
exists
in interfacecom.atlassian.fugue.Maybe<T>
-
forall
public boolean forall(com.google.common.base.Predicate<? super T> p)
Deprecated.- Specified by:
forall
in interfacecom.atlassian.fugue.Maybe<T>
-
isEmpty
public boolean isEmpty()
Deprecated.- Specified by:
isEmpty
in interfacecom.atlassian.fugue.Maybe<T>
-
isDefined
public boolean isDefined()
Deprecated.- Specified by:
isDefined
in interfacecom.atlassian.fugue.Maybe<T>
-
-