Uses of Class
fj.data.Option
-
Packages that use Option Package Description fj Types that set the premise for the existence of Functional Java.fj.control.parallel Parallelization strategies.fj.data Common algebraic data types.fj.data.fingertrees Provides 2-3 finger trees, a functional representation of persistent sequences supporting access to the ends in amortized O(1) time.fj.data.hamt fj.data.optic Optic data types adapted from the Scala Monocle library and inspired by the Haskell Lens library.fj.function A prelude of commonly used first-class functions -
-
Uses of Option in fj
Fields in fj with type parameters of type Option Modifier and Type Field Description static F<java.lang.Character,Option<Digit>>
Digit. fromChar
First-class conversion from a character to a digit.Methods in fj that return Option Modifier and Type Method Description static Option<Digit>
Digit. fromChar(char c)
Converts the given character in the given long value to a digit.<B> Option<P1<B>>
P1. traverseOption(F<A,Option<B>> f)
Traversable instance of P1 for Option<C> Option<P2<A,C>>
P2. traverseOption(F<B,Option<C>> f)
Methods in fj that return types with arguments of type Option Modifier and Type Method Description static <A> Monoid<Option<A>>
Monoid. firstOptionMonoid()
A monoid for options that take the first available value.static <A> Semigroup<Option<A>>
Semigroup. firstOptionSemigroup()
A semigroup for optional values that take the first available value.static <A> Monoid<Option<A>>
Monoid. lastOptionMonoid()
A monoid for options that take the last available value.static <A> Semigroup<Option<A>>
Semigroup. lastOptionSemigroup()
A semigroup for optional values that take the last available value.Monoid<Option<A>>
Semigroup. lift()
Lifts the semigroup to obtain a trivial monoid.default F<Option<A>,Option<B>>
F. mapOption()
Promotes this function to map over an optional value.default F<Option<A>,Option<B>>
F. mapOption()
Promotes this function to map over an optional value.static <A,B>
F<A,Option<B>>Function. nullable(F<A,B> f)
Return a function that inspects the argument of the given function for anull
value and if so, does not apply the value, instead returning an empty optional value.static <A> Equal<Option<A>>
Equal. optionEqual(Equal<A> ea)
An equal instance for theOption
type.static <A> Hash<Option<A>>
Hash. optionHash(Hash<A> ha)
A hash instance for theOption
type.default F<A,Option<B>>
F. optionK()
Promotes this function so that it returns its result in an Option.default F2<Option<A>,Option<B>,Option<C>>
F2. optionM()
Promotes this function to a function on Options.default F2<Option<A>,Option<B>,Option<C>>
F2. optionM()
Promotes this function to a function on Options.default F2<Option<A>,Option<B>,Option<C>>
F2. optionM()
Promotes this function to a function on Options.static <A> Monoid<Option<A>>
Monoid. optionMonoid(Semigroup<A> aSemigroup)
Lift aSemigroup<A>
for A to aMonoid<Option<A>>
, using Option.none() as zero.static <A> Ord<Option<A>>
Ord. optionOrd(Ord<A> oa)
An order instance for theOption
type.static <A> Show<Option<A>>
Show. optionShow(Show<A> sa)
A show instance for theOption
type.static <A> P1<Option<A>>
P1. sequence(Option<P1<A>> o)
Turns an optional P1 into a lazy option.Methods in fj with parameters of type Option Modifier and Type Method Description static <A> P1<Option<A>>
P1. sequence(Option<P1<A>> o)
Turns an optional P1 into a lazy option.Method parameters in fj with type arguments of type Option Modifier and Type Method Description <B> Option<P1<B>>
P1. traverseOption(F<A,Option<B>> f)
Traversable instance of P1 for Option<C> Option<P2<A,C>>
P2. traverseOption(F<B,Option<C>> f)
-
Uses of Option in fj.control.parallel
Fields in fj.control.parallel declared as Option Modifier and Type Field Description private Option<A>
Promise. v
Methods in fj.control.parallel that return Option Modifier and Type Method Description Option<A>
Promise. claim(long timeout, java.util.concurrent.TimeUnit unit)
Waits if necessary for the computation to complete, and then retrieves its result.Methods in fj.control.parallel that return types with arguments of type Option Modifier and Type Method Description static <A> F<P1<Option<A>>,java.util.concurrent.Callable<A>>
Callables. fromOption()
Returns a transformation from an optional value to a Callablestatic <A> F<java.util.concurrent.Callable<A>,P1<Option<A>>>
Callables. option()
Returns a transformation from a Callable to an optional value.static <A> P1<Option<A>>
Callables. option(java.util.concurrent.Callable<A> a)
Turns the given Callable into an optional value.Method parameters in fj.control.parallel with type arguments of type Option Modifier and Type Method Description static <A> java.util.concurrent.Callable<A>
Callables. fromOption(F0<Option<A>> o)
Turns an optional value into a Callable. -
Uses of Option in fj.data
Subclasses of Option in fj.data Modifier and Type Class Description private static class
Option.None<A>
private static class
Option.Some<A>
Fields in fj.data declared as Option Modifier and Type Field Description private Option<A>
Enumerator. max
private Option<A>
Enumerator. min
Fields in fj.data with type parameters of type Option Modifier and Type Field Description static F<java.math.BigInteger,Option<Natural>>
Natural. fromBigInt
A function that returns the natural number equal to a given BigIntegerstatic F<Option<java.lang.Boolean>,java.util.BitSet>
Java. Option_BitSet
A function that converts options to bit sets.static F<Option<java.lang.Character>,java.lang.String>
Conversions. Option_String
A function that converts options to strings.static F<Option<java.lang.Character>,java.lang.StringBuffer>
Conversions. Option_StringBuffer
A function that converts options to string buffers.static F<Option<java.lang.Character>,java.lang.StringBuilder>
Conversions. Option_StringBuilder
A function that converts options to string builders.static F<java.lang.String,Option<java.lang.Byte>>
Option. parseByte
A function that parses a string to a byte.static F<java.lang.String,Option<java.lang.Double>>
Option. parseDouble
A function that parses a string to a double.static F<java.lang.String,Option<java.lang.Float>>
Option. parseFloat
A function that parses a string to a float.static F<java.lang.String,Option<java.lang.Integer>>
Option. parseInt
A function that parses a string to an integer.static F<java.lang.String,Option<java.lang.Long>>
Option. parseLong
A function that parses a string to a long.static F<java.lang.String,Option<java.lang.Short>>
Option. parseShort
A function that parses a string to a short.private F<A,F<java.lang.Long,Option<A>>>
Enumerator. plus
private F<A,Option<A>>
Enumerator. predecessor
static F<java.lang.String,Option<java.lang.Character>>
Conversions. String_Option
A function that converts strings to options.static F<java.lang.StringBuffer,Option<java.lang.Character>>
Conversions. StringBuffer_Option
A function that converts string buffers to options.static F<java.lang.StringBuilder,Option<java.lang.Character>>
Conversions. StringBuilder_Option
A function that converts string builders to options.static F<Natural,F<Natural,Option<Natural>>>
Natural. subtract
A function that subtracts its first argument from its second.private F<A,Option<A>>
Enumerator. successor
private Set<P2<K,Option<V>>>
TreeMap. tree
Methods in fj.data that return Option Modifier and Type Method Description <A> Option<E>
Validation. accumulate(Semigroup<E> s, Validation<E,A> va)
Accumulates errors anonymously.<A,B>
Option<E>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb)
Accumulates errors anonymously.<A,B,C>
Option<E>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc)
Accumulates errors anonymously.<A,B,C,D>
Option<E>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd)
Accumulates errors anonymously.<A,B,C,D,E$>
Option<E>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, Validation<E,E$> ve)
Accumulates errors anonymously.<A,B,C,D,E$,F$>
Option<E>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, Validation<E,E$> ve, Validation<E,F$> vf)
Accumulates errors anonymously.<A,B,C,D,E$,F$,G>
Option<E>Validation. accumulate(Semigroup<E> s, Validation<E,A> va, Validation<E,B> vb, Validation<E,C> vc, Validation<E,D> vd, Validation<E,E$> ve, Validation<E,F$> vf, Validation<E,G> vg)
Accumulates errors anonymously.<B> Option<B>
Option. apply(Option<F<A,B>> of)
Performs function application within an optional value (applicative functor pattern).<B,C,D,E,F$,G,H,I>
Option<I>Option. bind(Option<B> ob, Option<C> oc, Option<D> od, Option<E> oe, Option<F$> of, Option<G> og, Option<H> oh, F<A,F<B,F<C,F<D,F<E,F<F$,F<G,F<H,I>>>>>>>> f)
Binds the given function across the element of this optional value and the given optional value with a final join.<B,C,D,E,F$,G,H>
Option<H>Option. bind(Option<B> ob, Option<C> oc, Option<D> od, Option<E> oe, Option<F$> of, Option<G> og, F<A,F<B,F<C,F<D,F<E,F<F$,F<G,H>>>>>>> f)
Binds the given function across the element of this optional value and the given optional value with a final join.<B,C,D,E,F$,G>
Option<G>Option. bind(Option<B> ob, Option<C> oc, Option<D> od, Option<E> oe, Option<F$> of, F<A,F<B,F<C,F<D,F<E,F<F$,G>>>>>> f)
Binds the given function across the element of this optional value and the given optional value with a final join.<B,C,D,E,F$>
Option<F$>Option. bind(Option<B> ob, Option<C> oc, Option<D> od, Option<E> oe, F<A,F<B,F<C,F<D,F<E,F$>>>>> f)
Binds the given function across the element of this optional value and the given optional value with a final join.<B,C,D,E>
Option<E>Option. bind(Option<B> ob, Option<C> oc, Option<D> od, F<A,F<B,F<C,F<D,E>>>> f)
Binds the given function across the element of this optional value and the given optional value with a final join.<B,C,D>
Option<D>Option. bind(Option<B> ob, Option<C> oc, F<A,F<B,F<C,D>>> f)
Binds the given function across the element of this optional value and the given optional value with a final join.<B,C>
Option<C>Option. bind(Option<B> ob, F<A,F<B,C>> f)
Binds the given function across the element of this optional value and the given optional value with a final join.<B> Option<B>
Option. bind(F<A,Option<B>> f)
Binds the given function across the element of this optional value with a final join.<B> Option<P2<A,B>>
Option. bindProduct(Option<B> ob)
<B,C>
Option<P3<A,B,C>>Option. bindProduct(Option<B> ob, Option<C> oc)
<B,C,D>
Option<P4<A,B,C,D>>Option. bindProduct(Option<B> ob, Option<C> oc, Option<D> od)
<B,C,D,E>
Option<P5<A,B,C,D,E>>Option. bindProduct(Option<B> ob, Option<C> oc, Option<D> od, Option<E> oe)
<B,C,D,E,F$>
Option<P6<A,B,C,D,E,F$>>Option. bindProduct(Option<B> ob, Option<C> oc, Option<D> od, Option<E> oe, Option<F$> of)
<B,C,D,E,F$,G>
Option<P7<A,B,C,D,E,F$,G>>Option. bindProduct(Option<B> ob, Option<C> oc, Option<D> od, Option<E> oe, Option<F$> of, Option<G> og)
<B,C,D,E,F$,G,H>
Option<P8<A,B,C,D,E,F$,G,H>>Option. bindProduct(Option<B> ob, Option<C> oc, Option<D> od, Option<E> oe, Option<F$> of, Option<G> og, Option<H> oh)
Option<TreeZipper<A>>
TreeZipper. delete()
Removes the current node from the tree.Option<Zipper<A>>
Zipper. deleteLeft()
Possibly deletes the element at the focus, then moves the element on the left into focus.Option<Zipper<A>>
Zipper. deleteLeftCycle()
Possibly deletes the element at the focus, then move the element on the left into focus.Option<Zipper<A>>
Zipper. deleteRight()
Possibly deletes the element at the focus, then moves the element on the right into focus.Option<Zipper<A>>
Zipper. deleteRightCycle()
Possibly deletes the element at the focus, then move the element on the right into focus.Option<java.lang.Integer>
List. elementIndex(Equal<A> e, A a)
Returns the index of the first element in this list which is equal (by the given equality) to the query element, or None if there is no such element.<X> Option<Either<A,X>>
Either.LeftProjection. filter(F<A,java.lang.Boolean> f)
ReturnsNone
if this projection has no value or if the given predicatep
does not hold for the value, otherwise, returns a right inSome
.<X> Option<Either<X,B>>
Either.RightProjection. filter(F<B,java.lang.Boolean> f)
ReturnsNone
if this projection has no value or if the given predicatep
does not hold for the value, otherwise, returns a left inSome
.<X,Y>
Option<Either3<A,X,Y>>Either3.LeftProjection. filter(F<A,java.lang.Boolean> f)
<X,Y>
Option<Either3<X,B,Y>>Either3.MiddleProjection. filter(F<B,java.lang.Boolean> f)
<X,Y>
Option<Either3<X,Y,C>>Either3.RightProjection. filter(F<C,java.lang.Boolean> f)
Option<A>
Option. filter(F<A,java.lang.Boolean> f)
Filters elements from this optional value by returning only elements which producetrue
when the given function is applied to them.<A> Option<Validation<E,A>>
Validation.FailProjection. filter(F<E,java.lang.Boolean> f)
ReturnsNone
if this is a success or if the given predicatep
does not hold for the failing value, otherwise, returns a fail inSome
.<A> Option<Validation<A,T>>
Validation. filter(F<T,java.lang.Boolean> f)
ReturnsNone
if this is a failure or if the given predicatep
does not hold for the success value, otherwise, returns a success inSome
.Option<A>
Array. find(F<A,java.lang.Boolean> f)
Finds the first occurrence of an element that matches the given predicate or no value if no elements match.Option<A>
List. find(F<A,java.lang.Boolean> f)
Finds the first occurrence of an element that matches the given predicate or no value if no elements match.Option<A>
Stream. find(F<A,java.lang.Boolean> f)
Finds the first occurrence of an element that matches the given predicate or no value if no elements match.Option<Zipper<A>>
Zipper. find(F<A,java.lang.Boolean> p)
Moves the focus to the element matching the given predicate, if present.Option<TreeZipper<A>>
TreeZipper. findChild(F<Tree<A>,java.lang.Boolean> p)
Navigates to the first child of the current location, that satisfies the given predicate.Option<TreeZipper<A>>
TreeZipper. firstChild()
Navigtes to the first child of the current location.static <A> Option<TreeZipper<A>>
TreeZipper. fromForest(Stream<Tree<A>> ts)
Creates a new tree zipper focused on the first element of the given forest.static <A> Option<NonEmptyList<A>>
NonEmptyList. fromList(List<A> as)
Returns a potential non-empty list from the given list.static <T> Option<T>
Option. fromNull(T t)
Turns an unsafe nullable value into a safe optional value.static <A> Option<Zipper<A>>
Zipper. fromStream(Stream<A> a)
Possibly create a zipper if the provided stream has at least one element, otherwise None.static <A> Option<Zipper<A>>
Zipper. fromStreamEnd(Stream<A> a)
Possibly create a zipper if the provided stream has at least one element, otherwise None.static Option<java.lang.String>
Option. fromString(java.lang.String s)
Returns an optional non-empty string, or no value if the given string is empty.Option<V>
HashMap. get(K k)
Returns a potential value that the given key maps to.Option<V>
TreeMap. get(K k)
Returns a potential value that the given key maps to.Option<TreeZipper<A>>
TreeZipper. getChild(int n)
Navigates to the given child of the current location, starting at index 0.Option<V>
HashMap. getDelete(K k)
Deletes the entry in the hash map that corresponds to the given key and returns any associated value.Option<A>
List. headOption()
Returns the head of the list, if any.Option<A>
Seq. headOption()
static <A> Option<A>
Option. iif(boolean p, A a)
Returns an optional value that has a value of the given argument if the given boolean is true, otherwise, returns no value.static <A> Option<A>
Option. iif(boolean p, F0<A> a)
Returns an optional value that has a value of the given argument if the given boolean is true, otherwise, returns no value.static <A> Option<A>
Option. iif(F<A,java.lang.Boolean> f, A a)
Returns an optional value that has a value of the given argument, if the given predicate holds on that argument, otherwise, returns no value.Option<java.lang.Integer>
LazyString. indexOf(char c)
Returns the first index of the given character in this lazy string, if present.Option<java.lang.Integer>
LazyString. indexOf(LazyString cs)
Returns the first index of the given substring in this lazy string, if present.Option<java.lang.Integer>
Stream. indexOf(F<A,java.lang.Boolean> p)
Returns the position of the first element matching the given predicate, if any.Option<TreeZipper<A>>
TreeZipper. insertDownAt(int n, Tree<A> t)
Inserts a tree at the specified location in the current node's stream of children.static <A> Option<A>
Option. join(Option<Option<A>> o)
Joins the given optional value of optional value using a bind operation.Option<TreeZipper<A>>
TreeZipper. lastChild()
Navigtes to the last child of the current location.Option<TreeZipper<A>>
TreeZipper. left()
Navigates to the left sibling of the current location.Option<A>
Either3. leftOption()
<B,C>
Option<C>Option. liftM2(Option<B> ob, F2<A,B,C> f)
Lift the function of arity-2 through options.static <A,B>
Option<B>List. lookup(Equal<A> e, List<P2<A,B>> x, A a)
Returns an associated value with the given key in the list of pairs.Option<A>
Set. lookup(A a)
Find element equal to the given one.Option<A>
Set. lookupGE(A a)
Find smallest element greater or equal to the given one.Option<A>
Set. lookupGT(A a)
Find smallest element greater than the given one.Option<A>
Set. lookupLE(A a)
Find largest element smaller or equal to the given one.Option<A>
Set. lookupLT(A a)
Find largest element smaller than the given one.<B> Option<B>
Option. map(F<A,B> f)
Maps the given function across this optional value.<B> Option<List<B>>
List. mapMOption(F<A,Option<B>> f)
Maps the given function across this list by binding through the Option monad.Option<A>
Enumerator. max()
Returns the maximum value for this enumerator if there is one.Option<A>
Set. max()
Option<P2<K,V>>
TreeMap. max()
Returns the maximum (key, value) pair in the tree if the tree is not empty.Option<A>
List. maximumOption(Ord<A> o)
Returns the maximum element in this list according to the given ordering.Option<K>
TreeMap. maxKey()
Returns the maximum key in the tree if the tree is not empty.Option<B>
Either3. middleOption()
Option<A>
Enumerator. min()
Returns the minimum value for this enumerator if there is one.Option<A>
Set. min()
Option<P2<K,V>>
TreeMap. min()
Returns the minimum (key, value) pair in the tree if the tree is not empty.Option<A>
List. minimumOption(Ord<A> o)
Returns the minimum element in this list according to the given ordering.Option<K>
TreeMap. minKey()
Returns the minimum key in the tree if the tree is not empty.Option<Zipper<A>>
Zipper. move(int n)
Move the focus to the specified index.static Option<Natural>
Natural. natural(long i)
Returns the natural number equal to the given longstatic Option<Natural>
Natural. natural(java.math.BigInteger i)
Returns the natural number equal to the given BigIntegerOption<Zipper<A>>
Zipper. next()
Possibly moves the focus to the next element in the list.static <T> Option<T>
Option. none()
Constructs an optional value that has no value.static <A> Option<A>
Java8. Optional_Option(java.util.Optional<A> o)
Option<A>
Option. orElse(Option<A> o)
Returns this optional value if there is one, otherwise, returns the argument optional value.Option<A>
Option. orElse(F0<Option<A>> o)
Returns this optional value if there is one, otherwise, returns the argument optional value.Option<TreeZipper<A>>
TreeZipper. parent()
Navigates to the parent of the current location.Option<A>
Enumerator. plus(A a, long l)
Moves a value along the enumerator a given number of times.Option<Natural>
Natural. pred()
Return the predecessor of this natural numberOption<A>
Enumerator. predecessor(A a)
Returns the potential predecessor of a value for this enumerator.Option<Zipper<A>>
Zipper. previous()
Possibly moves the focus to the previous element in the list.Option<TreeZipper<A>>
TreeZipper. right()
Navigates to the right sibling of the current location.Option<C>
Either3. rightOption()
static <A> Option<List<A>>
Option. sequence(List<Option<A>> a)
Sequence a list through the option monad.<B> Option<B>
Option. sequence(Option<B> o)
Performs a bind across the optional value, but ignores the element value in the function.static <E,A>
Option<Validation<E,A>>Option. sequence(Validation<E,Option<A>> a)
Sequence a validation through the option monad.static <B> Option<List<B>>
List. sequenceOption(List<Option<B>> list)
Sequence the given list and collect the output as an list.static <B> Option<Option<B>>
Option. sequenceOption(Option<Option<B>> option)
Sequence the given option and collect the output as an option.static <B> Option<Seq<B>>
Seq. sequenceOption(Seq<Option<B>> seq)
Sequence the given seq and collect the output as an seq.static <B> Option<Stream<B>>
Stream. sequenceOption(Stream<Option<B>> stream)
Sequence the given stream and collect the output as an stream.static <E,C>
Option<Validation<E,C>>Validation. sequenceOption(Validation<E,Option<C>> validation)
Sequence the given validation and collect the output as an option.static <T> Option<T>
Option. some(T t)
Constructs an optional value that has a value of the given argument.private static <A> Option<P2<Stream<A>,Stream<A>>>
TreeZipper. splitChildren(Stream<A> acc, Stream<A> xs, int n)
Option<Natural>
Natural. subtract(Natural n)
Subtract a natural number from another.Option<A>
Enumerator. successor(A a)
Returns the potential successor of a value for this enumerator.Option<List<A>>
List. tailOption()
Reutrns the tail of the list, if any.Option<A>
Array.ImmutableProjection. toOption()
Returns an option projection of this array;None
if empty, or the first element inSome
.Option<A>
Array. toOption()
Returns an option projection of this array;None
if empty, or the first element inSome
.Option<A>
Either.LeftProjection. toOption()
Returns this projection's value inSome
if it exists, otherwiseNone
.Option<B>
Either.RightProjection. toOption()
Returns this projection's value inSome
if it exists, otherwiseNone
.Option<A>
Either3.LeftProjection. toOption()
Option<B>
Either3.MiddleProjection. toOption()
Option<C>
Either3.RightProjection. toOption()
Option<P2<K,V>>
HashMap. toOption()
Option<A>
Stream. toOption()
Returns an option projection of this stream;None
if empty, or the first element inSome
.Option<E>
Validation.FailProjection. toOption()
Returns the failing value inSome
if there is one, otherwiseNone
.Option<T>
Validation. toOption()
Returns the success value inSome
if there is one, otherwiseNone
.Option<P2<K,A>>
PriorityQueue. top()
If the tree is not empty, returns the node with highest priority otherwise returns nothing.Option<Zipper<A>>
IterableW. toZipper()
<C> Option<Either<C,B>>
Either.LeftProjection. traverseOption(F<A,Option<C>> f)
<C> Option<Either<A,C>>
Either.RightProjection. traverseOption(F<B,Option<C>> f)
Traverse this right with the given function and collect the output as an option.<X> Option<Either3<X,B,C>>
Either3.LeftProjection. traverseOption(F<A,Option<X>> f)
<X> Option<Either3<A,X,C>>
Either3.MiddleProjection. traverseOption(F<B,Option<X>> f)
<X> Option<Either3<A,B,X>>
Either3.RightProjection. traverseOption(F<C,Option<X>> f)
<B> Option<List<B>>
List. traverseOption(F<A,Option<B>> f)
Traverses through the List with the given function<B> Option<Option<B>>
Option. traverseOption(F<A,Option<B>> f)
Traverse this option with the given function and collect the output as an option.<B> Option<Seq<B>>
Seq. traverseOption(F<A,Option<B>> f)
Traverses through the Seq with the given function<B> Option<Stream<B>>
Stream. traverseOption(F<A,Option<B>> f)
Traverses through the Seq with the given function<C> Option<Validation<E,C>>
Validation. traverseOption(F<T,Option<C>> f)
Traverse this validation with the given function and collect the output as an option.<C> Option<Either<C,B>>
Either. traverseOptionLeft(F<A,Option<C>> f)
Traversable instance of LeftProjection of Either for Option.<C> Option<Either<A,C>>
Either. traverseOptionRight(F<B,Option<C>> f)
Traversable instance of RightProjection of Either for Option.Methods in fj.data that return types with arguments of type Option Modifier and Type Method Description static <A> F<Array<A>,Option<A>>
Conversions. Array_Option()
A function that converts arrays to options.static <A,B>
F<F<A,Option<B>>,F<Option<A>,Option<B>>>Option. bind()
First-class bind function.static <A,B>
F<F<A,Option<B>>,F<Option<A>,Option<B>>>Option. bind()
First-class bind function.static <A,B>
F<F<A,Option<B>>,F<Option<A>,Option<B>>>Option. bind()
First-class bind function.static <A,B>
F<Either<A,B>,Option<A>>Conversions. Either_OptionA()
A function that converts eithers to options.static <A,B>
F<Either<A,B>,Option<B>>Conversions. Either_OptionB()
A function that converts eithers to options.static <A> F2<F<Tree<A>,java.lang.Boolean>,TreeZipper<A>,Option<TreeZipper<A>>>
TreeZipper. findChild()
A first-class version of the findChild function.static <T> F<T,Option<T>>
Option. fromNull()
Turns an unsafe nullable value into a safe optional value.static <A> F<Option<A>,A>
Option. fromSome()
Returns a function that takes an optional value to a value or errors if there is no value.static F<java.lang.String,Option<java.lang.String>>
Option. fromString()
Returns a function that transforms a string to an optional non-empty string, or no value if the string is empty.F<K,Option<V>>
HashMap. get()
A curried version ofHashMap.get(Object)
.F<K,Option<V>>
TreeMap. get()
Returns a first-class version of the get method for this TreeMap.static <E> Iteratee.IterV<E,Option<E>>
Iteratee.IterV. head()
An iteratee that consumes the head of the inputstatic <A> F2<F<A,java.lang.Boolean>,A,Option<A>>
Option. iif()
First-class version of the iif function.static <A> F<Option<A>,java.lang.Boolean>
Option. isNone_()
A first-class version of the isNone method.static <A> F<Option<A>,java.lang.Boolean>
Option. isSome_()
A first-class version of the isSome method.static <A> F<Option<Option<A>>,Option<A>>
Option. join()
First-class join function.static <A> F<Option<Option<A>>,Option<A>>
Option. join()
First-class join function.static <A> F<Option<Option<A>>,Option<A>>
Option. join()
First-class join function.static <A> F<TreeZipper<A>,Option<TreeZipper<A>>>
TreeZipper. left_()
A first-class version of the left() function.static <A,B,C>
F<Option<A>,F<Option<B>,Option<C>>>Option. liftM2(F<A,F<B,C>> f)
Promotes a function of arity-2 so that it operates over options.static <A,B,C>
F<Option<A>,F<Option<B>,Option<C>>>Option. liftM2(F<A,F<B,C>> f)
Promotes a function of arity-2 so that it operates over options.static <A,B,C>
F<Option<A>,F<Option<B>,Option<C>>>Option. liftM2(F<A,F<B,C>> f)
Promotes a function of arity-2 so that it operates over options.static <A> F<List<A>,Option<A>>
Conversions. List_Option()
A function that converts lists to options.static <A,B>
F2<List<P2<A,B>>,A,Option<B>>List. lookup(Equal<A> e)
Returns a partially applied version ofList.lookup(Equal, List, Object)
.static <A,B>
F<F<A,B>,F<Option<A>,Option<B>>>Option. map()
A first-class map function.static <A,B>
F<F<A,B>,F<Option<A>,Option<B>>>Option. map()
A first-class map function.static <A> F<java.lang.Integer,F<Zipper<A>,Option<Zipper<A>>>>
Zipper. move()
A first-class version of the move function.static <A> F<Zipper<A>,Option<Zipper<A>>>
Zipper. next_()
First-class version of the next() function.static <A> Prism<Option<A>,Unit>
Option.Optic. none()
None prismstatic <T> F<T,Option<T>>
Option. none_()
static <A,B>
F<Option<A>,B>Option. option_(B none, F<A,B> some)
First-class catamorphism for Option: return a function that will performs a reduction on an optional value using the given arguments.static <A> F<Option<A>,Array<A>>
Conversions. Option_Array()
A function that converts options to arrays.static <A> F<Option<A>,java.util.concurrent.ArrayBlockingQueue<A>>
Java. Option_ArrayBlockingQueue(boolean fair)
A function that converts options to array blocking queues.static <A> F<Option<A>,java.util.ArrayList<A>>
Java. Option_ArrayList()
A function that converts options to array lists.static <A> F<Option<A>,java.util.concurrent.ConcurrentLinkedQueue<A>>
Java. Option_ConcurrentLinkedQueue()
A function that converts options to concurrent linked queues.static <A> F<Option<A>,java.util.concurrent.CopyOnWriteArrayList<A>>
Java. Option_CopyOnWriteArrayList()
A function that converts options to copy on write array lists.static <A> F<Option<A>,java.util.concurrent.CopyOnWriteArraySet<A>>
Java. Option_CopyOnWriteArraySet()
A function that converts options to copy on write array sets.static <A extends java.util.concurrent.Delayed>
F<Option<A>,java.util.concurrent.DelayQueue<A>>Java. Option_DelayQueue()
A function that converts options to delay queues.static <A,B>
F<P1<A>,F<Option<B>,Either<A,B>>>Conversions. Option_Either()
A function that converts options to eithers.static <A extends java.lang.Enum<A>>
F<Option<A>,java.util.EnumSet<A>>Java. Option_EnumSet()
A function that converts options to enum sets.static <A> F<Option<A>,java.util.HashSet<A>>
Java. Option_HashSet()
A function that converts options to hash sets.static <A> F<Option<A>,java.util.concurrent.LinkedBlockingQueue<A>>
Java. Option_LinkedBlockingQueue()
A function that converts options to linked blocking queues.static <A> F<Option<A>,java.util.LinkedHashSet<A>>
Java. Option_LinkedHashSet()
A function that converts options to linked hash sets.static <A> F<Option<A>,java.util.LinkedList<A>>
Java. Option_LinkedList()
A function that converts options to linked lists.static <A> F<Option<A>,List<A>>
Conversions. Option_List()
A function that converts options to lists.static <A> F<Option<A>,java.util.Optional<A>>
Java8. Option_Optional()
static <A> F<Option<A>,java.util.concurrent.PriorityBlockingQueue<A>>
Java. Option_PriorityBlockingQueue()
A function that converts options to priority blocking queues.static <A> F<Option<A>,java.util.PriorityQueue<A>>
Java. Option_PriorityQueue()
A function that converts options to priority queues.static <A> F<Option<A>,java.util.Stack<A>>
Java. Option_Stack()
A function that converts options to stacks.static <A> F<Option<A>,Stream<A>>
Conversions. Option_Stream()
A function that converts options to streams.static <A> F<Option<A>,java.util.concurrent.SynchronousQueue<A>>
Java. Option_SynchronousQueue(boolean fair)
A function that converts options to synchronous queues.static <A> F<Option<A>,java.util.TreeSet<A>>
Java. Option_TreeSet()
A function that converts options to tree sets.static <A> F<Option<A>,java.util.Vector<A>>
Java. Option_Vector()
A function that converts options to vectors.static <A> F<java.util.Optional<A>,Option<A>>
Java8. Optional_Option()
static <E> Iteratee.IterV<E,Option<E>>
Iteratee.IterV. peek()
An iteratee that returns the first element of the inputF<A,F<java.lang.Long,Option<A>>>
Enumerator. plus()
Returns a function that moves a value along the enumerator a given number of times.F<A,Option<A>>
Enumerator. plus(long l)
Returns a function that moves a value along the enumerator a given number of times.F<java.lang.Long,Option<A>>
Enumerator. plus(A a)
Returns a function that moves a value along the enumerator a given number of times.static F<Natural,Option<Natural>>
Natural. pred_()
First-class predecessor function.F<A,Option<A>>
Enumerator. predecessor()
Returns the potential predecessor of a value for this enumerator in curried form.static <A> F<Zipper<A>,Option<Zipper<A>>>
Zipper. previous_()
First-class version of the previous() function.static <A,B>
PPrism<Option<A>,Option<B>,A,B>Option.Optic. pSome()
Polymorphic Some prismstatic <A,B>
PPrism<Option<A>,Option<B>,A,B>Option.Optic. pSome()
Polymorphic Some prismstatic <A> F<TreeZipper<A>,Option<TreeZipper<A>>>
TreeZipper. right_()
A first-class version of the right() function.static <A> Stream<Option<A>>
Stream. sequence(Option<Stream<A>> o)
Sequence through the Stream monad.static <L,B>
Either<L,Option<B>>Option. sequenceEither(Option<Either<L,B>> option)
Sequence the given option and collect the output on the right side of an either.static <R,B>
Either<Option<B>,R>Option. sequenceEitherLeft(Option<Either<B,R>> option)
Sequence the given option and collect the output on the left side of an either.static <L,B>
Either<L,Option<B>>Option. sequenceEitherRight(Option<Either<L,B>> option)
Sequence the given option and collect the output on the right side of an either.static <C,B>
F<C,Option<B>>Option. sequenceF(Option<F<C,B>> option)
Sequence the given option and collect the output as a function.static <B> IO<Option<B>>
Option. sequenceIO(Option<IO<B>> option)
Sequence the given option and collect the output as an IO.static <B> List<Option<B>>
Option. sequenceList(Option<List<B>> option)
Sequence the given option and collect the output as an list.static <B> Option<Option<B>>
Option. sequenceOption(Option<Option<B>> option)
Sequence the given option and collect the output as an option.static <B> P1<Option<B>>
Option. sequenceP1(Option<P1<B>> option)
Sequence the given option and collect the output as a P1.static <B> Seq<Option<B>>
Option. sequenceSeq(Option<Seq<B>> option)
Sequence the given option and collect the output as a seq.static <B> Set<Option<B>>
Option. sequenceSet(Ord<B> ord, Option<Set<B>> option)
Sequence the given option and collect the output as a set; use the given ord to order the set.static <B> Stream<Option<B>>
Option. sequenceStream(Option<Stream<B>> option)
Sequence the given option and collect the output as a stream.static <B> Trampoline<Option<B>>
Option. sequenceTrampoline(Option<Trampoline<B>> option)
Sequence the given option and collect the output as a trampoline.static <E,B>
Validation<E,Option<B>>Option. sequenceValidation(Option<Validation<E,B>> option)
Sequence the given option and collect the output as a validation.static <A> Prism<Option<A>,A>
Option.Optic. some()
Monomorphic Some prismstatic <T> F<T,Option<T>>
Option. some_()
P3<Set<A>,Option<A>,Set<A>>
Set. split(A a)
Splits this set at the given element.P3<Set<V>,Option<V>,Set<V>>
TreeMap. split(Ord<V> ord, K k)
Splits this TreeMap at the given key.P3<TreeMap<K,V>,Option<V>,TreeMap<K,V>>
TreeMap. splitLookup(K k)
Splits this TreeMap at the given key.static <A> F<Stream<A>,Option<A>>
Conversions. Stream_Option()
A function that converts streams to options.F<A,Option<A>>
Enumerator. successor()
Returns the potential successor of a value for this enumerator in curried form.static <A,X>
F<Option<A>,F<X,Either<X,A>>>Option. toEither()
A first-class version of the toEither method.P2<Option<P2<K,A>>,PriorityQueue<K,A>>
PriorityQueue. topDequeue()
Returns a tuple of the node with the highest priority and the rest of the priority queue.<L,B>
Either<L,Option<B>>Option. traverseEither(F<A,Either<L,B>> f)
Traverse this option with the given function and collect the output on the right side of an either.<R,B>
Either<Option<B>,R>Option. traverseEitherLeft(F<A,Either<B,R>> f)
Traverse this option with the given function and collect the output on the left side of an either.<L,B>
Either<L,Option<B>>Option. traverseEitherRight(F<A,Either<L,B>> f)
Traverse this option with the given function and collect the output on the right side of an either.<C,B>
F<C,Option<B>>Option. traverseF(F<A,F<C,B>> f)
Traverse this option with the given function and collect the output as a function.<B> IO<Option<B>>
Option. traverseIO(F<A,IO<B>> f)
Traverse this option with the given function and collect the output as an IO.<B> List<Option<B>>
Option. traverseList(F<A,List<B>> f)
Traverse this option with the given function and collect the output as a list.<B> Option<Option<B>>
Option. traverseOption(F<A,Option<B>> f)
Traverse this option with the given function and collect the output as an option.<B> P1<Option<B>>
Option. traverseP1(F<A,P1<B>> f)
Traverse this option with the given function and collect the output as a P1.<B> Seq<Option<B>>
Option. traverseSeq(F<A,Seq<B>> f)
Traverse this option with the given function and collect the output a seq.<B> F2<Ord<B>,F<A,Set<B>>,Set<Option<B>>>
Option. traverseSet()
<B> Set<Option<B>>
Option. traverseSet(Ord<B> ord, F<A,Set<B>> f)
Traverse this option with the given function and collect the output as a set; use the given ord to order the set.<B> Stream<Option<B>>
Option. traverseStream(F<A,Stream<B>> f)
Traverse this option with the given function and collect the output as a stream.<B> Trampoline<Option<B>>
Option. traverseTrampoline(F<A,Trampoline<B>> f)
Traverse this option with the given function and collect the output as a trampoline.<E,B>
Validation<E,Option<B>>Option. traverseValidation(F<A,Validation<E,B>> f)
Traverse this option with the given function and collect the output as a validation.Methods in fj.data with parameters of type Option Modifier and Type Method Description <B> Option<B>
Option. apply(Option<F<A,B>> of)
Performs function application within an optional value (applicative functor pattern).<B,C,D,E,F$,G,H,I>
Option<I>Option. bind(Option<B> ob, Option<C> oc, Option<D> od, Option<E> oe, Option<F$> of, Option<G> og, Option<H> oh, F<A,F<B,F<C,F<D,F<E,F<F$,F<G,F<H,I>>>>>>>> f)
Binds the given function across the element of this optional value and the given optional value with a final join.<B,C,D,E,F$,G,H>
Option<H>Option. bind(Option<B> ob, Option<C> oc, Option<D> od, Option<E> oe, Option<F$> of, Option<G> og, F<A,F<B,F<C,F<D,F<E,F<F$,F<G,H>>>>>>> f)
Binds the given function across the element of this optional value and the given optional value with a final join.<B,C,D,E,F$,G>
Option<G>Option. bind(Option<B> ob, Option<C> oc, Option<D> od, Option<E> oe, Option<F$> of, F<A,F<B,F<C,F<D,F<E,F<F$,G>>>>>> f)
Binds the given function across the element of this optional value and the given optional value with a final join.<B,C,D,E,F$>
Option<F$>Option. bind(Option<B> ob, Option<C> oc, Option<D> od, Option<E> oe, F<A,F<B,F<C,F<D,F<E,F$>>>>> f)
Binds the given function across the element of this optional value and the given optional value with a final join.<B,C,D,E>
Option<E>Option. bind(Option<B> ob, Option<C> oc, Option<D> od, F<A,F<B,F<C,F<D,E>>>> f)
Binds the given function across the element of this optional value and the given optional value with a final join.<B,C,D>
Option<D>Option. bind(Option<B> ob, Option<C> oc, F<A,F<B,F<C,D>>> f)
Binds the given function across the element of this optional value and the given optional value with a final join.<B,C>
Option<C>Option. bind(Option<B> ob, F<A,F<B,C>> f)
Binds the given function across the element of this optional value and the given optional value with a final join.<B> Option<P2<A,B>>
Option. bindProduct(Option<B> ob)
<B,C>
Option<P3<A,B,C>>Option. bindProduct(Option<B> ob, Option<C> oc)
<B,C,D>
Option<P4<A,B,C,D>>Option. bindProduct(Option<B> ob, Option<C> oc, Option<D> od)
<B,C,D,E>
Option<P5<A,B,C,D,E>>Option. bindProduct(Option<B> ob, Option<C> oc, Option<D> od, Option<E> oe)
<B,C,D,E,F$>
Option<P6<A,B,C,D,E,F$>>Option. bindProduct(Option<B> ob, Option<C> oc, Option<D> od, Option<E> oe, Option<F$> of)
<B,C,D,E,F$,G>
Option<P7<A,B,C,D,E,F$,G>>Option. bindProduct(Option<B> ob, Option<C> oc, Option<D> od, Option<E> oe, Option<F$> of, Option<G> og)
<B,C,D,E,F$,G,H>
Option<P8<A,B,C,D,E,F$,G,H>>Option. bindProduct(Option<B> ob, Option<C> oc, Option<D> od, Option<E> oe, Option<F$> of, Option<G> og, Option<H> oh)
static IO<java.io.BufferedReader>
IOFunctions. bufferedReader(java.io.File f, Option<java.nio.charset.Charset> encoding)
static <A> Enumerator<A>
Enumerator. enumerator(F<A,Option<A>> successor, F<A,Option<A>> predecessor, Option<A> max, Option<A> min, Ord<A> order)
Construct an enumerator.static <A> Enumerator<A>
Enumerator. enumerator(F<A,Option<A>> successor, F<A,Option<A>> predecessor, Option<A> max, Option<A> min, Ord<A> order, F<A,F<java.lang.Long,Option<A>>> plus)
Construct an enumerator.static <A> IO<Iteratee.IterV<char[],A>>
IOFunctions. enumFileCharChunks(java.io.File f, Option<java.nio.charset.Charset> encoding, Iteratee.IterV<char[],A> i)
An IO monad that reads char chunks from the given file and passes them to the given iteratee.static <A> IO<Iteratee.IterV<java.lang.Character,A>>
IOFunctions. enumFileChars(java.io.File f, Option<java.nio.charset.Charset> encoding, Iteratee.IterV<java.lang.Character,A> i)
An IO monad that reads char chunks from the given file and passes single chars to the given iteratee.static <A> IO<Iteratee.IterV<java.lang.String,A>>
IOFunctions. enumFileLines(java.io.File f, Option<java.nio.charset.Charset> encoding, Iteratee.IterV<java.lang.String,A> i)
An IO monad that reads lines from the given file (using aBufferedReader
) and passes lines to the provided iteratee.static IO<java.io.Reader>
IOFunctions. fileReader(java.io.File f, Option<java.nio.charset.Charset> encoding)
static <A> Option<A>
Option. join(Option<Option<A>> o)
Joins the given optional value of optional value using a bind operation.<B,C>
Option<C>Option. liftM2(Option<B> ob, F2<A,B,C> f)
Lift the function of arity-2 through options.static <A> java.util.Optional<A>
Java8. Option_Optional(Option<A> o)
Convert an Option toOptional
.Option<A>
Option. orElse(Option<A> o)
Returns this optional value if there is one, otherwise, returns the argument optional value.<B> Option<B>
Option. sequence(Option<B> o)
Performs a bind across the optional value, but ignores the element value in the function.static <A> Stream<Option<A>>
Stream. sequence(Option<Stream<A>> o)
Sequence through the Stream monad.static <L,B>
Either<L,Option<B>>Option. sequenceEither(Option<Either<L,B>> option)
Sequence the given option and collect the output on the right side of an either.static <R,B>
Either<Option<B>,R>Option. sequenceEitherLeft(Option<Either<B,R>> option)
Sequence the given option and collect the output on the left side of an either.static <L,B>
Either<L,Option<B>>Option. sequenceEitherRight(Option<Either<L,B>> option)
Sequence the given option and collect the output on the right side of an either.static <C,B>
F<C,Option<B>>Option. sequenceF(Option<F<C,B>> option)
Sequence the given option and collect the output as a function.static <B> IO<Option<B>>
Option. sequenceIO(Option<IO<B>> option)
Sequence the given option and collect the output as an IO.static <B> List<Option<B>>
Option. sequenceList(Option<List<B>> option)
Sequence the given option and collect the output as an list.static <B> Option<Option<B>>
Option. sequenceOption(Option<Option<B>> option)
Sequence the given option and collect the output as an option.static <B> P1<Option<B>>
Option. sequenceP1(Option<P1<B>> option)
Sequence the given option and collect the output as a P1.static <B> Seq<Option<B>>
Option. sequenceSeq(Option<Seq<B>> option)
Sequence the given option and collect the output as a seq.static <B> Set<Option<B>>
Option. sequenceSet(Ord<B> ord, Option<Set<B>> option)
Sequence the given option and collect the output as a set; use the given ord to order the set.static <B> Stream<Option<B>>
Option. sequenceStream(Option<Stream<B>> option)
Sequence the given option and collect the output as a stream.static <B> Trampoline<Option<B>>
Option. sequenceTrampoline(Option<Trampoline<B>> option)
Sequence the given option and collect the output as a trampoline.static <E,B>
Validation<E,Option<B>>Option. sequenceValidation(Option<Validation<E,B>> option)
Sequence the given option and collect the output as a validation.Enumerator<A>
Enumerator. setMax(Option<A> max)
Create a new enumerator with the given maximum value.Enumerator<A>
Enumerator. setMin(Option<A> min)
Create a new enumerator with the given minimum value.Method parameters in fj.data with type arguments of type Option Modifier and Type Method Description <B> Option<B>
Option. bind(F<A,Option<B>> f)
Binds the given function across the element of this optional value with a final join.static <A> Enumerator<A>
Enumerator. enumerator(F<A,Option<A>> successor, F<A,Option<A>> predecessor, Option<A> max, Option<A> min, Ord<A> order)
Construct an enumerator.static <A> Enumerator<A>
Enumerator. enumerator(F<A,Option<A>> successor, F<A,Option<A>> predecessor, Option<A> max, Option<A> min, Ord<A> order, F<A,F<java.lang.Long,Option<A>>> plus)
Construct an enumerator.static <A> Option<A>
Option. join(Option<Option<A>> o)
Joins the given optional value of optional value using a bind operation.<B> Option<List<B>>
List. mapMOption(F<A,Option<B>> f)
Maps the given function across this list by binding through the Option monad.Option<A>
Option. orElse(F0<Option<A>> o)
Returns this optional value if there is one, otherwise, returns the argument optional value.static <A> Option<List<A>>
Option. sequence(List<Option<A>> a)
Sequence a list through the option monad.static <E,A>
Option<Validation<E,A>>Option. sequence(Validation<E,Option<A>> a)
Sequence a validation through the option monad.static <B> Option<List<B>>
List. sequenceOption(List<Option<B>> list)
Sequence the given list and collect the output as an list.static <B> Option<Option<B>>
Option. sequenceOption(Option<Option<B>> option)
Sequence the given option and collect the output as an option.static <B> Option<Seq<B>>
Seq. sequenceOption(Seq<Option<B>> seq)
Sequence the given seq and collect the output as an seq.static <B> Option<Stream<B>>
Stream. sequenceOption(Stream<Option<B>> stream)
Sequence the given stream and collect the output as an stream.static <E,C>
Option<Validation<E,C>>Validation. sequenceOption(Validation<E,Option<C>> validation)
Sequence the given validation and collect the output as an option.static <K,V>
TreeMap<K,V>TreeMap. setTreeMap(Ord<K> ord, Set<P2<K,Option<V>>> s)
Constructs a TreeMap from the given set.static <A> List<A>
Option. somes(List<Option<A>> as)
Returns all the values in the given list.static <A> Stream<A>
Option. somes(Stream<Option<A>> as)
Returns all the values in the given stream.<C> Option<Either<C,B>>
Either.LeftProjection. traverseOption(F<A,Option<C>> f)
<C> Option<Either<A,C>>
Either.RightProjection. traverseOption(F<B,Option<C>> f)
Traverse this right with the given function and collect the output as an option.<X> Option<Either3<X,B,C>>
Either3.LeftProjection. traverseOption(F<A,Option<X>> f)
<X> Option<Either3<A,X,C>>
Either3.MiddleProjection. traverseOption(F<B,Option<X>> f)
<X> Option<Either3<A,B,X>>
Either3.RightProjection. traverseOption(F<C,Option<X>> f)
<B> Option<List<B>>
List. traverseOption(F<A,Option<B>> f)
Traverses through the List with the given function<B> Option<Option<B>>
Option. traverseOption(F<A,Option<B>> f)
Traverse this option with the given function and collect the output as an option.<B> Option<Seq<B>>
Seq. traverseOption(F<A,Option<B>> f)
Traverses through the Seq with the given function<B> Option<Stream<B>>
Stream. traverseOption(F<A,Option<B>> f)
Traverses through the Seq with the given function<C> Option<Validation<E,C>>
Validation. traverseOption(F<T,Option<C>> f)
Traverse this validation with the given function and collect the output as an option.<C> Option<Either<C,B>>
Either. traverseOptionLeft(F<A,Option<C>> f)
Traversable instance of LeftProjection of Either for Option.<C> Option<Either<A,C>>
Either. traverseOptionRight(F<B,Option<C>> f)
Traversable instance of RightProjection of Either for Option.private Stream<Tree<TreeZipper<A>>>
TreeZipper. uf(F<TreeZipper<A>,Option<TreeZipper<A>>> f)
static <A,B>
List<A>List. unfold(F<B,Option<P2<A,B>>> f, B b)
Unfolds across the given function starting at the given value to produce a list.static <A,B>
Stream<A>Stream. unfold(F<B,Option<P2<A,B>>> f, B b)
Unfolds across the given function starting at the given value to produce a stream.Constructors in fj.data with parameters of type Option Constructor Description Enumerator(F<A,Option<A>> successor, F<A,Option<A>> predecessor, Option<A> max, Option<A> min, Ord<A> order, F<A,F<java.lang.Long,Option<A>>> plus)
Constructor parameters in fj.data with type arguments of type Option Constructor Description Enumerator(F<A,Option<A>> successor, F<A,Option<A>> predecessor, Option<A> max, Option<A> min, Ord<A> order, F<A,F<java.lang.Long,Option<A>>> plus)
TreeMap(Set<P2<K,Option<V>>> tree)
-
Uses of Option in fj.data.fingertrees
Methods in fj.data.fingertrees that return Option Modifier and Type Method Description Option<A>
FingerTree. headOption()
(package private) Option<Digit<V,A>>
Digit. init()
(package private) Option<Digit<V,A>>
Digit. tail()
Methods in fj.data.fingertrees that return types with arguments of type Option Modifier and Type Method Description (package private) abstract P3<Option<Digit<V,A>>,A,Option<Digit<V,A>>>
Digit. split1(F<V,java.lang.Boolean> predicate, V acc)
(package private) abstract P3<Option<Digit<V,A>>,A,Option<Digit<V,A>>>
Digit. split1(F<V,java.lang.Boolean> predicate, V acc)
(package private) P3<Option<Digit<V,A>>,A,Option<Digit<V,A>>>
Four. split1(F<V,java.lang.Boolean> predicate, V acc)
(package private) P3<Option<Digit<V,A>>,A,Option<Digit<V,A>>>
Four. split1(F<V,java.lang.Boolean> predicate, V acc)
(package private) abstract P3<Option<Digit<V,A>>,A,Option<Digit<V,A>>>
Node. split1(F<V,java.lang.Boolean> predicate, V acc)
(package private) abstract P3<Option<Digit<V,A>>,A,Option<Digit<V,A>>>
Node. split1(F<V,java.lang.Boolean> predicate, V acc)
(package private) P3<Option<Digit<V,A>>,A,Option<Digit<V,A>>>
Node2. split1(F<V,java.lang.Boolean> predicate, V acc)
(package private) P3<Option<Digit<V,A>>,A,Option<Digit<V,A>>>
Node2. split1(F<V,java.lang.Boolean> predicate, V acc)
(package private) P3<Option<Digit<V,A>>,A,Option<Digit<V,A>>>
Node3. split1(F<V,java.lang.Boolean> predicate, V acc)
(package private) P3<Option<Digit<V,A>>,A,Option<Digit<V,A>>>
Node3. split1(F<V,java.lang.Boolean> predicate, V acc)
(package private) P3<Option<Digit<V,A>>,A,Option<Digit<V,A>>>
One. split1(F<V,java.lang.Boolean> predicate, V acc)
(package private) P3<Option<Digit<V,A>>,A,Option<Digit<V,A>>>
One. split1(F<V,java.lang.Boolean> predicate, V acc)
(package private) P3<Option<Digit<V,A>>,A,Option<Digit<V,A>>>
Three. split1(F<V,java.lang.Boolean> predicate, V acc)
(package private) P3<Option<Digit<V,A>>,A,Option<Digit<V,A>>>
Three. split1(F<V,java.lang.Boolean> predicate, V acc)
(package private) P3<Option<Digit<V,A>>,A,Option<Digit<V,A>>>
Two. split1(F<V,java.lang.Boolean> predicate, V acc)
(package private) P3<Option<Digit<V,A>>,A,Option<Digit<V,A>>>
Two. split1(F<V,java.lang.Boolean> predicate, V acc)
Methods in fj.data.fingertrees with parameters of type Option Modifier and Type Method Description private static <V,A>
FingerTree<V,A>Deep. deepL(Measured<V,A> measured, Option<Digit<V,A>> lOpt, FingerTree<V,Node<V,A>> m, Digit<V,A> r)
private static <V,A>
FingerTree<V,A>Deep. deepR(Measured<V,A> measured, Option<Digit<V,A>> rOpt, FingerTree<V,Node<V,A>> m, Digit<V,A> l)
-
Uses of Option in fj.data.hamt
Methods in fj.data.hamt that return Option Modifier and Type Method Description Option<V>
HashArrayMappedTrie. find(K k)
Returns an optional value for the given key k.Option<V>
HashArrayMappedTrie. find(K k, int lowIndex, int highIndex)
Returns an optional value for the given key k for those nodes between lowIndex (inclusive) and highIndex (exclusive). -
Uses of Option in fj.data.optic
Methods in fj.data.optic that return Option Modifier and Type Method Description Option<A>
Optional. getOption(S s)
abstract Option<A>
POptional. getOption(S s)
get the target of aPOptional
or nothing if there is no targetabstract Option<A>
PPrism. getOption(S s)
get the target of aPPrism
or nothing if there is no targetOption<A>
Prism. getOption(S s)
Option<A>
Fold. headOption(S s)
get the first target of aFold
Option<A>
PTraversal. headOption(S s)
get the first target of aPTraversal
Methods in fj.data.optic that return types with arguments of type Option Modifier and Type Method Description F<S,Option<A>>
Fold. find(F<A,java.lang.Boolean> p)
find the first target of aFold
matching the predicateF<S,Option<A>>
PTraversal. find(F<A,java.lang.Boolean> p)
find the first target of aPTraversal
matching the predicateF<S,Option<T>>
POptional. modifyOption(F<A,B> f)
modify polymorphically the target of aPOptional
with a function.F<S,Option<T>>
PPrism. modifyOption(F<A,B> f)
modify polymorphically the target of aPPrism
with a function.F<S,Option<S>>
Lens. modifyOptionF(F<A,Option<A>> f)
F<S,Option<S>>
Optional. modifyOptionF(F<A,Option<A>> f)
F<S,Option<T>>
PIso. modifyOptionF(F<A,Option<B>> f)
modify polymorphically the target of aPIso
with an Applicative functionabstract F<S,Option<T>>
PLens. modifyOptionF(F<A,Option<B>> f)
modify polymorphically the target of aPLens
with an Applicative functionabstract F<S,Option<T>>
POptional. modifyOptionF(F<A,Option<B>> f)
modify polymorphically the target of aPOptional
with an Applicative functionF<S,Option<T>>
PPrism. modifyOptionF(F<A,Option<B>> f)
modify polymorphically the target of aPPrism
with an Applicative functionabstract F<S,Option<T>>
PTraversal. modifyOptionF(F<A,Option<B>> f)
modify polymorphically the target of aPTraversal
with an Applicative functionF<S,Option<S>>
Traversal. modifyOptionF(F<A,Option<A>> f)
F<S,Option<T>>
POptional. setOption(B b)
set polymorphically the target of aPOptional
with a value.F<S,Option<T>>
PPrism. setOption(B b)
set polymorphically the target of aPPrism
with a value.Method parameters in fj.data.optic with type arguments of type Option Modifier and Type Method Description F<S,Option<S>>
Lens. modifyOptionF(F<A,Option<A>> f)
F<S,Option<S>>
Optional. modifyOptionF(F<A,Option<A>> f)
F<S,Option<T>>
PIso. modifyOptionF(F<A,Option<B>> f)
modify polymorphically the target of aPIso
with an Applicative functionabstract F<S,Option<T>>
PLens. modifyOptionF(F<A,Option<B>> f)
modify polymorphically the target of aPLens
with an Applicative functionabstract F<S,Option<T>>
POptional. modifyOptionF(F<A,Option<B>> f)
modify polymorphically the target of aPOptional
with an Applicative functionF<S,Option<T>>
PPrism. modifyOptionF(F<A,Option<B>> f)
modify polymorphically the target of aPPrism
with an Applicative functionabstract F<S,Option<T>>
PTraversal. modifyOptionF(F<A,Option<B>> f)
modify polymorphically the target of aPTraversal
with an Applicative functionF<S,Option<S>>
Traversal. modifyOptionF(F<A,Option<A>> f)
static <S,A>
Optional<S,A>Optional. optional(F<S,Option<A>> getOption, F<A,F<S,S>> set)
static <S,A>
Prism<S,A>Prism. prism(F<S,Option<A>> getOption, F<A,S> reverseGet)
-
Uses of Option in fj.function
Methods in fj.function that return types with arguments of type Option Modifier and Type Method Description static F<java.lang.String,Option<java.lang.Double>>
Doubles. fromString()
A function that converts strings to doubles.static F<java.lang.String,Option<java.lang.Integer>>
Integers. fromString()
A function that converts strings to integers.static F<java.lang.String,Option<java.lang.Long>>
Longs. fromString()
A function that converts strings to integers.default F0<Option<Z>>
TryEffect0. toF0()
Method parameters in fj.function with type arguments of type Option Modifier and Type Method Description static <X> X
Visitor. findFirst(List<Option<X>> values, F0<X> def)
Returns the first value available in the given list of optional values.static <A,B>
BVisitor. visitor(List<F<A,Option<B>>> visitors, F0<B> def, A value)
Returns the first value found in the list of visitors after application of the given value, otherwise returns the given default.
-