Uses of Class
io.atlassian.fugue.Option
Packages that use Option
Package
Description
-
Uses of Option in io.atlassian.fugue
Subclasses of Option in io.atlassian.fugueModifier and TypeClassDescription(package private) static final classOne of the big two actual implementation classes.(package private) static final classOption.Some<A>One of the big two actual implementation classes.Fields in io.atlassian.fugue declared as OptionFields in io.atlassian.fugue with type parameters of type OptionModifier and TypeFieldDescriptionFunctions.PartialComposer.abFunctions.PartialComposer.bcIterables.UnfoldingIterable.fIterables.UnfoldingIterable.Iter.fFunctions.Matcher.fsIterables.CollectingIterable.partialMethods in io.atlassian.fugue that return OptionModifier and TypeMethodDescriptionstatic <A,B> Option <B> Applies an option of A to an option of a function with input type A and result type B and return an option of B.ReturnsNoneif this is a left or if the given predicatepdoes not hold for the contained value, otherwise, returns a right inSome.ReturnsNoneif this projection has no value or if the given predicatepdoes not hold for the value, otherwise, returns a left inSome.ReturnsNoneif this projection has no value or if the given predicatepdoes not hold for the value, otherwise, returns a right inSome.Returns thisOptionif it is nonempty and applying the predicate to this option's value returns true.Returns thisOptionif it is nonempty and applying the predicate to this option's value returns false.static <A> Option<A> Find the first option thatisDefined, or if there aren't any, then none.static <T> Option<T> Finds the first item that matches the predicate.static <A> Option<A> Ifasis empty, returnsnone().final <B> Option<B> Applyfto the value if defined.static <A> Option<A> Option.fromOptional(Optional<A> optional) final <B> Option<B> Applyfto the value if defined.static <A> Option<A> Option.none()Factory method for None instances.static <A> Option<A> Factory method for None instances where the type token is handy.static <A> Option<A> Option.option(A a) Factory method forOptioninstances.If this is a some, return the same some.If this is a some, return the same some.static <A> Option<A> Option.some(A value) Factory method for Some instances.Either.AbstractProjection.toOption()Either.Projection.toOption()Returns this projection's value inSomeif it exists, otherwiseNone.Either.toOption()Convert this Either to an Option.Try.Delayed.toOption()Try.Failure.toOption()Try.Success.toOption()Try.toOption()Convert this Try to an Option.static <AA,A extends AA>
Option<AA> Upcasts anoptionof type A to an option of its super type AA.Methods in io.atlassian.fugue that return types with arguments of type OptionModifier and TypeMethodDescriptionFunctions.composeOption(Function<? super B, ? extends Option<? extends C>> bc, Function<? super A, ? extends Option<? extends B>> ab) Compose two PartialFunctions into one.Option.defined()Predicate for filtering defined options only.Options.filterNone(Iterable<Option<A>> options) Filter out undefined options.Partial application of the predicate argument toIterables.findFirst(Iterable, Predicate)returning a function that takes anIterableas its argumentMonoids.firstOption()A monoid for options (that take the first available value).FugueCollectors.flatten()Collect the values wrapped within the option.Collect the values wrapped within the option.Create a function that performs a map lookup returning None for null If you do not need a nondefaulted return result using a method reference is preferred map::getFunctions.isInstanceOf(Class<B> cls) Partial Function that does a type check and matches if the value is of the right type.Monoids.lastOption()A monoid for options that take the last available value.Eithers.leftMapper()A function that maps an either to an option of its left type.Options.lift()Returns a function that will lift a function that takes an A and returns a B into a function that takes an option of A and returns an option of B.Options.lift()Returns a function that will lift a function that takes an A and returns a B into a function that takes an option of A and returns an option of B.Lifts a function that takes an A and returns a B into a function that takes an option of A and returns an option of B.Lifts a function that takes an A and returns a B into a function that takes an option of A and returns an option of B.Lifts a predicate that takes an A into a predicate that takes an option of A.static <A,B, C> Function <BiFunction<A, B, C>, BiFunction<Option<A>, Option<B>, Option<C>>> Options.lift2()Returns a function that will lift a function that takes an A and a B and returns a C into a function that takes an option of A and an option of B and returns an option of C.static <A,B, C> Function <BiFunction<A, B, C>, BiFunction<Option<A>, Option<B>, Option<C>>> Options.lift2()Returns a function that will lift a function that takes an A and a B and returns a C into a function that takes an option of A and an option of B and returns an option of C.static <A,B, C> Function <BiFunction<A, B, C>, BiFunction<Option<A>, Option<B>, Option<C>>> Options.lift2()Returns a function that will lift a function that takes an A and a B and returns a C into a function that takes an option of A and an option of B and returns an option of C.static <A,B, C> BiFunction <Option<A>, Option<B>, Option<C>> Options.lift2(BiFunction<A, B, C> f2) Lifts a function that takes an A and a B and returns a C into a function that takes an option of A and an option of B and returns an option of C.static <A,B, C> BiFunction <Option<A>, Option<B>, Option<C>> Options.lift2(BiFunction<A, B, C> f2) Lifts a function that takes an A and a B and returns a C into a function that takes an option of A and an option of B and returns an option of C.static <A,B, C> BiFunction <Option<A>, Option<B>, Option<C>> Options.lift2(BiFunction<A, B, C> f2) Lifts a function that takes an A and a B and returns a C into a function that takes an option of A and an option of B and returns an option of C.Functions.mapNullToOption(Function<? super A, ? extends B> f) Maps a function that returns nulls into a Partial function that returns an Option of the result.Functions.matches(Function<? super A, ? extends Option<? extends B>> f1, Function<? super A, ? extends Option<? extends B>> f2) Creates a stack of matcher functions and returns the first result that matches.Functions.matches(Function<? super A, ? extends Option<? extends B>> f1, Function<? super A, ? extends Option<? extends B>> f2, Function<? super A, ? extends Option<? extends B>> f3) Creates a stack of matcher functions and returns the first result that matches.Functions.matches(Function<? super A, ? extends Option<? extends B>> f1, Function<? super A, ? extends Option<? extends B>> f2, Function<? super A, ? extends Option<? extends B>> f3, Function<? super A, ? extends Option<? extends B>> f4) Creates a stack of matcher functions and returns the first result that matches.Functions.matches(Function<? super A, ? extends Option<? extends B>> f1, Function<? super A, ? extends Option<? extends B>> f2, Function<? super A, ? extends Option<? extends B>> f3, Function<? super A, ? extends Option<? extends B>> f4, Function<? super A, ? extends Option<? extends B>> f5, Function<? super A, ? extends Option<? extends B>>... fs) Creates a stack of matcher functions and returns the first result that matches.Option.noneSupplier()Supplies None as required.Turn a null producing function into one that returns an option instead.Functions.nullToOption()Function that turns null inputs into a none, and not-null inputs into some.A monoid for options that combine inner value with a semigroup.Eithers.rightMapper()A function that maps an either to an option of its right type.Options.toOption()Function for wrapping values in a Some or None.Methods in io.atlassian.fugue with parameters of type OptionModifier and TypeMethodDescriptionstatic <A,B> Option <B> Applies an option of A to an option of a function with input type A and result type B and return an option of B.static <A> Supplier<A> Suppliers.fromOption(Option<A> option) Turns an Option into a supplier, but throws an exception if undefined.If this is a some, return the same some.static <AA,A extends AA>
Option<AA> Upcasts anoptionof type A to an option of its super type AA.Method parameters in io.atlassian.fugue with type arguments of type OptionModifier and TypeMethodDescriptionstatic <A,B> Iterable <B> Filters and maps (aka transforms) the unfiltered iterable.Functions.composeOption(Function<? super B, ? extends Option<? extends C>> bc, Function<? super A, ? extends Option<? extends B>> ab) Compose two PartialFunctions into one.Options.filterNone(Iterable<Option<A>> options) Filter out undefined options.static <A> Option<A> Find the first option thatisDefined, or if there aren't any, then none.final <B> Option<B> Applyfto the value if defined.static <A> Iterable<A> Functions.matches(Function<? super A, ? extends Option<? extends B>> f1, Function<? super A, ? extends Option<? extends B>> f2) Creates a stack of matcher functions and returns the first result that matches.Functions.matches(Function<? super A, ? extends Option<? extends B>> f1, Function<? super A, ? extends Option<? extends B>> f2, Function<? super A, ? extends Option<? extends B>> f3) Creates a stack of matcher functions and returns the first result that matches.Functions.matches(Function<? super A, ? extends Option<? extends B>> f1, Function<? super A, ? extends Option<? extends B>> f2, Function<? super A, ? extends Option<? extends B>> f3, Function<? super A, ? extends Option<? extends B>> f4) Creates a stack of matcher functions and returns the first result that matches.Functions.matches(Function<? super A, ? extends Option<? extends B>> f1, Function<? super A, ? extends Option<? extends B>> f2, Function<? super A, ? extends Option<? extends B>> f3, Function<? super A, ? extends Option<? extends B>> f4, Function<? super A, ? extends Option<? extends B>> f5, Function<? super A, ? extends Option<? extends B>>... fs) Creates a stack of matcher functions and returns the first result that matches.If this is a some, return the same some.static <A,B> Iterable <A> Builds an Iterable from a seed value untilfreturnsnone().Constructor parameters in io.atlassian.fugue with type arguments of type Option -
Uses of Option in io.atlassian.fugue.extensions.step
Fields in io.atlassian.fugue.extensions.step declared as OptionModifier and TypeFieldDescriptionOptionStep1.option1OptionStep2.option1OptionStep3.option1OptionStep4.option1OptionStep5.option1OptionStep6.option1OptionStep2.option2OptionStep3.option2OptionStep4.option2OptionStep5.option2OptionStep6.option2OptionStep3.option3OptionStep4.option3OptionStep5.option3OptionStep6.option3OptionStep4.option4OptionStep5.option4OptionStep6.option4OptionStep5.option5OptionStep6.option5OptionStep6.option6Methods in io.atlassian.fugue.extensions.step that return OptionModifier and TypeMethodDescription<Z> Option<Z> Terminating step expression, that will provide the previous steps to this function and return the result as asome<Z> Option<Z> OptionStep2.yield(BiFunction<? super A, ? super B, Z> functor) Terminating step expression, that will provide the previous steps to this function and return the result as asome<Z> Option<Z> Terminating step expression, that will provide the previous steps to this function and return the result as asome<Z> Option<Z> Terminating step expression, that will provide the previous steps to this function and return the result as asome<Z> Option<Z> Terminating step expression, that will provide the previous steps to this function and return the result as asome<Z> Option<Z> Terminating step expression, that will provide the previous steps to this function and return the result as asomeMethods in io.atlassian.fugue.extensions.step with parameters of type OptionModifier and TypeMethodDescriptionstatic <A> OptionStep1<A> Begin a new Steps expresison, using theOptiontype.Method parameters in io.atlassian.fugue.extensions.step with type arguments of type OptionModifier and TypeMethodDescription<B> OptionStep2<A, B> Apply the provided function with the previous Step results.<B> OptionStep2<A, B> Apply the provided supplier with the previous Step results.<C> OptionStep3<A, B, C> OptionStep2.then(BiFunction<? super A, ? super B, ? extends Option<? extends C>> functor) Apply the provided function with the previous Step results.<C> OptionStep3<A, B, C> Apply the provided supplier with the previous Step results.<D> OptionStep4<A, B, C, D> Apply the provided function with the previous Step results.<D> OptionStep4<A, B, C, D> Apply the provided supplier with the previous Step results.<E> OptionStep5<A, B, C, D, E> OptionStep4.then(Function4<? super A, ? super B, ? super C, ? super D, ? extends Option<? extends E>> functor) Apply the provided function with the previous Step results.<E> OptionStep5<A, B, C, D, E> Apply the provided supplier with the previous Step results.OptionStep5.then(Function5<? super A, ? super B, ? super C, ? super D, ? super E, ? extends Option<? extends F>> functor) Apply the provided function with the previous Step results.Apply the provided supplier with the previous Step results.Constructors in io.atlassian.fugue.extensions.step with parameters of type OptionModifierConstructorDescription(package private)OptionStep1(Option<A> option1) (package private)OptionStep2(Option<A> option1, Option<B> option2) (package private)(package private)(package private)OptionStep5(Option<A> option1, Option<B> option2, Option<C> option3, Option<D> option4, Option<E> option5) (package private)OptionStep6(Option<A> option1, Option<B> option2, Option<C> option3, Option<D> option4, Option<E> option5, Option<F> option6) -
Uses of Option in io.atlassian.fugue.extras
Method parameters in io.atlassian.fugue.extras with type arguments of type OptionModifier and TypeMethodDescriptionstatic <K1,K2, V1, V2>
com.google.common.collect.ImmutableMap<K2, V2> ImmutableMaps.collect(Map<K1, V1> from, Function<? super K1, Option<K2>> keyPartial, Function<? super V1, Option<V2>> valuePartial) Filters and maps (aka transforms) the source map.static <K1,K2, V1, V2>
com.google.common.collect.ImmutableMap<K2, V2> Filters and maps (aka transforms) the source map.static <K1,K2, V>
com.google.common.collect.ImmutableMap<K2, V> ImmutableMaps.collectByKey(Map<K1, V> from, Function<? super K1, Option<K2>> keyPartial) Filters and maps (aka transforms) the source map.static <K,V1, V2>
com.google.common.collect.ImmutableMap<K, V2> ImmutableMaps.collectByValue(Map<K, V1> from, Function<? super V1, Option<V2>> valuePartial) Filters and maps (aka transforms) the source map. -
Uses of Option in io.atlassian.fugue.hamcrest
Fields in io.atlassian.fugue.hamcrest with type parameters of type OptionModifier and TypeFieldDescriptionprivate static final org.hamcrest.Matcher<Option<?>> OptionMatchers.NoneMatcher.INSTANCEMethods in io.atlassian.fugue.hamcrest that return types with arguments of type OptionModifier and TypeMethodDescriptionstatic <L> org.hamcrest.Matcher<Option<?>> OptionMatchers.isNone()static <T> org.hamcrest.Matcher<Option<T>> OptionMatchers.isSome(org.hamcrest.Matcher<? super T> subMatcher) Methods in io.atlassian.fugue.hamcrest with parameters of type OptionModifier and TypeMethodDescriptionprotected voidOptionMatchers.NoneMatcher.describeMismatchSafely(Option<?> actual, org.hamcrest.Description mismatchDescription) protected voidOptionMatchers.SomeMatcher.describeMismatchSafely(Option<T> actual, org.hamcrest.Description mismatchDescription) protected booleanOptionMatchers.NoneMatcher.matchesSafely(Option<?> actual) protected booleanOptionMatchers.SomeMatcher.matchesSafely(Option<T> actual) -
Uses of Option in io.atlassian.fugue.optic
Methods in io.atlassian.fugue.optic that return OptionModifier and TypeMethodDescriptionget the target of aPOptionalor nothing if there is no targetget the target of aPPrismor nothing if there is no targetFold.headOption(S s) get the first target of aFoldPTraversal.headOption(S s) get the first target of aPTraversalMethods in io.atlassian.fugue.optic that return types with arguments of type OptionModifier and TypeMethodDescriptionfind the first target of aFoldmatching the predicatefind the first target of aPTraversalmatching the predicatePOptional.modifyOption(Function<A, B> f) modify polymorphically the target of aPOptionalwith a function.PPrism.modifyOption(Function<A, B> f) modify polymorphically the target of aPPrismwith a function.Lens.modifyOptionF(Function<A, Option<A>> f) Optional.modifyOptionF(Function<A, Option<A>> f) PIso.modifyOptionF(Function<A, Option<B>> f) modify polymorphically the target of aPIsowith an Applicative functionPLens.modifyOptionF(Function<A, Option<B>> f) modify polymorphically the target of aPLenswith an Applicative functionPOptional.modifyOptionF(Function<A, Option<B>> f) modify polymorphically the target of aPOptionalwith an Applicative functionPPrism.modifyOptionF(Function<A, Option<B>> f) modify polymorphically the target of aPPrismwith an Applicative functionPTraversal.modifyOptionF(Function<A, Option<B>> f) modify polymorphically the target of aPTraversalwith an Applicative functionTraversal.modifyOptionF(Function<A, Option<A>> f) set polymorphically the target of aPOptionalwith a value.set polymorphically the target of aPPrismwith a value.Method parameters in io.atlassian.fugue.optic with type arguments of type OptionModifier and TypeMethodDescriptionLens.modifyOptionF(Function<A, Option<A>> f) Optional.modifyOptionF(Function<A, Option<A>> f) PIso.modifyOptionF(Function<A, Option<B>> f) modify polymorphically the target of aPIsowith an Applicative functionPLens.modifyOptionF(Function<A, Option<B>> f) modify polymorphically the target of aPLenswith an Applicative functionPOptional.modifyOptionF(Function<A, Option<B>> f) modify polymorphically the target of aPOptionalwith an Applicative functionPPrism.modifyOptionF(Function<A, Option<B>> f) modify polymorphically the target of aPPrismwith an Applicative functionPTraversal.modifyOptionF(Function<A, Option<B>> f) modify polymorphically the target of aPTraversalwith an Applicative functionTraversal.modifyOptionF(Function<A, Option<A>> f) static <S,A> Optional <S, A> static <S,A> Prism <S, A> -
Uses of Option in io.atlassian.fugue.optic.law
Methods in io.atlassian.fugue.optic.law that return types with arguments of type OptionModifier and TypeMethodDescriptionTraversalLaws.headOption(S s) headOption returns the first element of getAllIsoLaws.modifyOptionFPoint(S s) modifyF Applicative.point(_) = Applicative.point(_)LensLaws.modifyOptionFPoint(S s) modifyF Applicative.point(_) = Applicative.point(_)OptionalLaws.modifyOptionFPoint(S s) modifyF Applicative.point(_) = Applicative.point(_)PrismLaws.modifyOptionFPoint(S s) modifyF Applicative.point(_) = Applicative.point(_)TraversalLaws.modifyOptionFPoint(S s) modifyF Applicative.point(_) = Applicative.point(_)OptionalLaws.modifyOptionIdentity(S s) modifyOption with id is isomorphomic to isMatchingPrismLaws.modifyOptionIdentity(S s) modifyOption with id is isomorphomic to isMatchingPrismLaws.roundTripOtherWay(A a) reverseGet produces a valueOptionalLaws.setGetOption(S s, A a) get what you setsetOption only succeeds when the Optional is matchingsetOption only succeeds when the Prism is matching -
Uses of Option in io.atlassian.fugue.optic.std
Methods in io.atlassian.fugue.optic.std that return types with arguments of type Option