Package com.atlassian.upm.api.util
Class Option<A>
java.lang.Object
com.atlassian.upm.api.util.Option<A>
- Type Parameters:
A- the type of element the option wraps
- All Implemented Interfaces:
Iterable<A>
Deprecated.
-
Method Summary
Modifier and TypeMethodDescriptionfinal booleanDeprecated.final booleanDeprecated.Deprecated.final <B> Option<B>Deprecated.Applyfto the wrapped value.abstract <B> BDeprecated.If this is a some value apply the some function, otherwise get the none value.final Aget()Deprecated.getOrElse(B other) Deprecated.Returns wrapped value if this is asome, otherwise returnsother.final ADeprecated.final inthashCode()Deprecated.final booleanDeprecated.iterator()Deprecated.final <B> Option<B>Deprecated.Applyfto the wrapped value.static <A> Option<A>none()Deprecated.static <A> Option<A>Deprecated.static <A> Option<A>option(A a) Deprecated.Deprecated.Returnsthisif this is a some, otherwise returns orElse.Deprecated.Returnsthisif this is a some, otherwise returns orElse.static <A> Option<A>some(A value) Deprecated.final StringtoString()Deprecated.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
fold
Deprecated.If this is a some value apply the some function, otherwise get the none value.- Type Parameters:
B- the result type- Parameters:
none- the supplier of the None typesome- the function to apply if we are a some- Returns:
- the appropriate value
-
get
Deprecated.- Returns:
- the wrapped value
- Throws:
NoSuchElementException- if this is a none
-
getOrElse
Deprecated.Returns wrapped value if this is asome, otherwise returnsother.- Parameters:
other- value to return if this is anone- Returns:
- wrapped value if this is a
some, otherwise returnsother
-
getOrElse
Deprecated.- Returns:
- the wrapped value if this is a
some, otherwise return the value supplied from theSupplier
-
isDefined
public final boolean isDefined()Deprecated.- Returns:
trueif this is asome,falseotherwise.
-
iterator
Deprecated. -
orElse
Deprecated.Returnsthisif this is a some, otherwise returns orElse. -
orElse
Deprecated.Returnsthisif this is a some, otherwise returns orElse. -
filter
Deprecated. -
exists
Deprecated.- Parameters:
f- the predicate to apply if we are asome- Returns:
trueif this is asomevalue for which the predicate returns true, otherwisefalse
-
flatMap
Deprecated.Applyfto the wrapped value.- Type Parameters:
B- return type off- Parameters:
f- function to apply to wrapped value- Returns:
- value returned from
f
-
map
Deprecated.Applyfto the wrapped value.- Type Parameters:
B- return type off- Parameters:
f- function to apply to wrapped value- Returns:
- new wrapped value
-
hashCode
public final int hashCode()Deprecated. -
equals
Deprecated. -
toString
Deprecated. -
none
Deprecated. -
none
Deprecated. -
some
Deprecated. -
option
Deprecated.
-
Optional. Plus there's the same class in com.atlassian.fugue