Option<A> class abstract

Implemented types
Implementers

Constructors

Option()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

all(bool f(A a)) bool
override
andThen<B>(covariant Option<B> next) Option<B>
override
any(bool f(A a)) bool
override
ap<B>(covariant Option<Function1<A, B>> ff) Option<B>
override
appendElement(A a) Option<A>
override
bind<B>(covariant Function1<A, Option<B>> f) Option<B>
override
cata<B, B2 extends B>(B ifNone(), B2 ifSome(A a)) → B
concatenate(Monoid<A> mi) → A
override
concatenateO(Semigroup<A> si) Option<A>
override
every(bool f(A a)) bool
override
filter(bool predicate(A a)) Option<A>
override
flatMap<B>(covariant Function1<A, Option<B>> f) Option<B>
override
fold<B>(B ifNone(), B ifSome(A a)) → B
foldLeft<B>(B z, B f(B previous, A a)) → B
override
foldLeftWithIndex<B>(B z, B f(B previous, int i, A a)) → B
override
foldMap<B>(Monoid<B> bMonoid, B f(A a)) → B
override
foldMapO<B>(Semigroup<B> si, B f(A a)) Option<B>
override
foldRight<B>(B z, B f(A a, B previous)) → B
override
foldRightWithIndex<B>(B z, B f(int i, A a, B previous)) → B
override
forEach(void sideEffect(A a)) → void
getOrElse(A dflt()) → A
intercalate(Monoid<A> mi, A a) → A
override
isNone() bool
isSome() bool
iterator() Iterator<A>
length() int
override
map<B>(B f(A a)) Option<B>
override
mapWithIndex<B>(B f(int i, A a)) Option<B>
override
maximum(Order<A> oa) Option<A>
override
minimum(Order<A> oa) Option<A>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
orElse(Option<A> other()) Option<A>
partition(bool f(A a)) Tuple2<Option<A>, Option<A>>
plus(covariant Option<A> o2) Option<A>
override
prependElement(A a) Option<A>
override
replace<B>(B replacement) Option<B>
override
reverse() Option<A>
strengthL<B>(B b) Option<Tuple2<B, A>>
override
strengthR<B>(B b) Option<Tuple2<A, B>>
override
toEither<B>(B ifNone()) Either<B, A>
toIterable() Iterable<A>
toNullable() → A?
toString() String
A string representation of this object.
override
traverseFree<F, B>(Free<F, B> f(A a)) Free<F, Option<B>>
traverseFuture<B>(Future<B> f(A a)) Future<Option<B>>
traverseIList<B>(IList<B> f(A a)) IList<Option<B>>
traverseIVector<B>(IVector<B> f(A a)) IVector<Option<B>>
traverseState<S, B>(State<S, B> f(A a)) State<S, Option<B>>
traverseTask<B>(Task<B> f(A a)) Task<Option<B>>
where(bool predicate(A a)) Option<A>
override
zipWithIndex() Option<Tuple2<int, A>>
override

Operators

operator %(dynamic ifNone) Either<dynamic, A>
operator ==(Object other) bool
The equality operator.
inherited
operator |(A dflt) → A

Static Methods

lift<A, B>(B f(A a)) Function1<Option<A>, Option<B>>
lift10<A, B, C, D, E, F, G, H, I, J, K>(K f(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j)) Function10<Option<A>, Option<B>, Option<C>, Option<D>, Option<E>, Option<F>, Option<G>, Option<H>, Option<I>, Option<J>, Option<K>>
lift11<A, B, C, D, E, F, G, H, I, J, K, L>(L f(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k)) Function11<Option<A>, Option<B>, Option<C>, Option<D>, Option<E>, Option<F>, Option<G>, Option<H>, Option<I>, Option<J>, Option<K>, Option<L>>
lift12<A, B, C, D, E, F, G, H, I, J, K, L, M>(M f(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l)) Function12<Option<A>, Option<B>, Option<C>, Option<D>, Option<E>, Option<F>, Option<G>, Option<H>, Option<I>, Option<J>, Option<K>, Option<L>, Option<M>>
lift13<A, B, C, D, E, F, G, H, I, J, K, L, M, N>(N f(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m)) Function13<Option<A>, Option<B>, Option<C>, Option<D>, Option<E>, Option<F>, Option<G>, Option<H>, Option<I>, Option<J>, Option<K>, Option<L>, Option<M>, Option<N>>
lift14<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(O f(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n)) Function14<Option<A>, Option<B>, Option<C>, Option<D>, Option<E>, Option<F>, Option<G>, Option<H>, Option<I>, Option<J>, Option<K>, Option<L>, Option<M>, Option<N>, Option<O>>
lift15<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>(P f(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n, O o)) Function15<Option<A>, Option<B>, Option<C>, Option<D>, Option<E>, Option<F>, Option<G>, Option<H>, Option<I>, Option<J>, Option<K>, Option<L>, Option<M>, Option<N>, Option<O>, Option<P>>
lift16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q>(Q f(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n, O o, P p)) Function16<Option<A>, Option<B>, Option<C>, Option<D>, Option<E>, Option<F>, Option<G>, Option<H>, Option<I>, Option<J>, Option<K>, Option<L>, Option<M>, Option<N>, Option<O>, Option<P>, Option<Q>>
lift17<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R>(R f(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n, O o, P p, Q q)) Function17<Option<A>, Option<B>, Option<C>, Option<D>, Option<E>, Option<F>, Option<G>, Option<H>, Option<I>, Option<J>, Option<K>, Option<L>, Option<M>, Option<N>, Option<O>, Option<P>, Option<Q>, Option<R>>
lift18<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S>(S f(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n, O o, P p, Q q, R r)) Function18<Option<A>, Option<B>, Option<C>, Option<D>, Option<E>, Option<F>, Option<G>, Option<H>, Option<I>, Option<J>, Option<K>, Option<L>, Option<M>, Option<N>, Option<O>, Option<P>, Option<Q>, Option<R>, Option<S>>
lift19<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T>(T f(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n, O o, P p, Q q, R r, S s)) Function19<Option<A>, Option<B>, Option<C>, Option<D>, Option<E>, Option<F>, Option<G>, Option<H>, Option<I>, Option<J>, Option<K>, Option<L>, Option<M>, Option<N>, Option<O>, Option<P>, Option<Q>, Option<R>, Option<S>, Option<T>>
lift2<A, B, C>(C f(A a, B b)) Function2<Option<A>, Option<B>, Option<C>>
lift20<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U>(U f(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n, O o, P p, Q q, R r, S s, T t)) Function20<Option<A>, Option<B>, Option<C>, Option<D>, Option<E>, Option<F>, Option<G>, Option<H>, Option<I>, Option<J>, Option<K>, Option<L>, Option<M>, Option<N>, Option<O>, Option<P>, Option<Q>, Option<R>, Option<S>, Option<T>, Option<U>>
lift3<A, B, C, D>(D f(A a, B b, C c)) Function3<Option<A>, Option<B>, Option<C>, Option<D>>
lift4<A, B, C, D, E>(E f(A a, B b, C c, D d)) Function4<Option<A>, Option<B>, Option<C>, Option<D>, Option<E>>
lift5<A, B, C, D, E, F>(F f(A a, B b, C c, D d, E e)) Function5<Option<A>, Option<B>, Option<C>, Option<D>, Option<E>, Option<F>>
lift6<A, B, C, D, E, F, G>(G f(A a, B b, C c, D d, E e, F f)) Function6<Option<A>, Option<B>, Option<C>, Option<D>, Option<E>, Option<F>, Option<G>>
lift7<A, B, C, D, E, F, G, H>(H f(A a, B b, C c, D d, E e, F f, G g)) Function7<Option<A>, Option<B>, Option<C>, Option<D>, Option<E>, Option<F>, Option<G>, Option<H>>
lift8<A, B, C, D, E, F, G, H, I>(I f(A a, B b, C c, D d, E e, F f, G g, H h)) Function8<Option<A>, Option<B>, Option<C>, Option<D>, Option<E>, Option<F>, Option<G>, Option<H>, Option<I>>
lift9<A, B, C, D, E, F, G, H, I, J>(J f(A a, B b, C c, D d, E e, F f, G g, H h, I i)) Function9<Option<A>, Option<B>, Option<C>, Option<D>, Option<E>, Option<F>, Option<G>, Option<H>, Option<I>, Option<J>>
map10<A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E, E2 extends E, F, F2 extends F, G, G2 extends G, H, H2 extends H, I, I2 extends I, J, J2 extends J, K>(Option<A2> fa, Option<B2> fb, Option<C2> fc, Option<D2> fd, Option<E2> fe, Option<F2> ff, Option<G2> fg, Option<H2> fh, Option<I2> fi, Option<J2> fj, K fun(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j)) Option<K>
map11<A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E, E2 extends E, F, F2 extends F, G, G2 extends G, H, H2 extends H, I, I2 extends I, J, J2 extends J, K, K2 extends K, L>(Option<A2> fa, Option<B2> fb, Option<C2> fc, Option<D2> fd, Option<E2> fe, Option<F2> ff, Option<G2> fg, Option<H2> fh, Option<I2> fi, Option<J2> fj, Option<K2> fk, L fun(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k)) Option<L>
map12<A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E, E2 extends E, F, F2 extends F, G, G2 extends G, H, H2 extends H, I, I2 extends I, J, J2 extends J, K, K2 extends K, L, L2 extends L, M>(Option<A2> fa, Option<B2> fb, Option<C2> fc, Option<D2> fd, Option<E2> fe, Option<F2> ff, Option<G2> fg, Option<H2> fh, Option<I2> fi, Option<J2> fj, Option<K2> fk, Option<L2> fl, M fun(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l)) Option<M>
map13<A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E, E2 extends E, F, F2 extends F, G, G2 extends G, H, H2 extends H, I, I2 extends I, J, J2 extends J, K, K2 extends K, L, L2 extends L, M, M2 extends M, N>(Option<A2> fa, Option<B2> fb, Option<C2> fc, Option<D2> fd, Option<E2> fe, Option<F2> ff, Option<G2> fg, Option<H2> fh, Option<I2> fi, Option<J2> fj, Option<K2> fk, Option<L2> fl, Option<M2> fm, N fun(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m)) Option<N>
map14<A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E, E2 extends E, F, F2 extends F, G, G2 extends G, H, H2 extends H, I, I2 extends I, J, J2 extends J, K, K2 extends K, L, L2 extends L, M, M2 extends M, N, N2 extends N, O>(Option<A2> fa, Option<B2> fb, Option<C2> fc, Option<D2> fd, Option<E2> fe, Option<F2> ff, Option<G2> fg, Option<H2> fh, Option<I2> fi, Option<J2> fj, Option<K2> fk, Option<L2> fl, Option<M2> fm, Option<N2> fn, O fun(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n)) Option<O>
map15<A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E, E2 extends E, F, F2 extends F, G, G2 extends G, H, H2 extends H, I, I2 extends I, J, J2 extends J, K, K2 extends K, L, L2 extends L, M, M2 extends M, N, N2 extends N, O, O2 extends O, P>(Option<A2> fa, Option<B2> fb, Option<C2> fc, Option<D2> fd, Option<E2> fe, Option<F2> ff, Option<G2> fg, Option<H2> fh, Option<I2> fi, Option<J2> fj, Option<K2> fk, Option<L2> fl, Option<M2> fm, Option<N2> fn, Option<O2> fo, P fun(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n, O o)) Option<P>
map16<A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E, E2 extends E, F, F2 extends F, G, G2 extends G, H, H2 extends H, I, I2 extends I, J, J2 extends J, K, K2 extends K, L, L2 extends L, M, M2 extends M, N, N2 extends N, O, O2 extends O, P, P2 extends P, Q>(Option<A2> fa, Option<B2> fb, Option<C2> fc, Option<D2> fd, Option<E2> fe, Option<F2> ff, Option<G2> fg, Option<H2> fh, Option<I2> fi, Option<J2> fj, Option<K2> fk, Option<L2> fl, Option<M2> fm, Option<N2> fn, Option<O2> fo, Option<P2> fp, Q fun(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n, O o, P p)) Option<Q>
map17<A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E, E2 extends E, F, F2 extends F, G, G2 extends G, H, H2 extends H, I, I2 extends I, J, J2 extends J, K, K2 extends K, L, L2 extends L, M, M2 extends M, N, N2 extends N, O, O2 extends O, P, P2 extends P, Q, Q2 extends Q, R>(Option<A2> fa, Option<B2> fb, Option<C2> fc, Option<D2> fd, Option<E2> fe, Option<F2> ff, Option<G2> fg, Option<H2> fh, Option<I2> fi, Option<J2> fj, Option<K2> fk, Option<L2> fl, Option<M2> fm, Option<N2> fn, Option<O2> fo, Option<P2> fp, Option<Q2> fq, R fun(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n, O o, P p, Q q)) Option<R>
map18<A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E, E2 extends E, F, F2 extends F, G, G2 extends G, H, H2 extends H, I, I2 extends I, J, J2 extends J, K, K2 extends K, L, L2 extends L, M, M2 extends M, N, N2 extends N, O, O2 extends O, P, P2 extends P, Q, Q2 extends Q, R, R2 extends R, S>(Option<A2> fa, Option<B2> fb, Option<C2> fc, Option<D2> fd, Option<E2> fe, Option<F2> ff, Option<G2> fg, Option<H2> fh, Option<I2> fi, Option<J2> fj, Option<K2> fk, Option<L2> fl, Option<M2> fm, Option<N2> fn, Option<O2> fo, Option<P2> fp, Option<Q2> fq, Option<R2> fr, S fun(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n, O o, P p, Q q, R r)) Option<S>
map19<A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E, E2 extends E, F, F2 extends F, G, G2 extends G, H, H2 extends H, I, I2 extends I, J, J2 extends J, K, K2 extends K, L, L2 extends L, M, M2 extends M, N, N2 extends N, O, O2 extends O, P, P2 extends P, Q, Q2 extends Q, R, R2 extends R, S, S2 extends S, T>(Option<A2> fa, Option<B2> fb, Option<C2> fc, Option<D2> fd, Option<E2> fe, Option<F2> ff, Option<G2> fg, Option<H2> fh, Option<I2> fi, Option<J2> fj, Option<K2> fk, Option<L2> fl, Option<M2> fm, Option<N2> fn, Option<O2> fo, Option<P2> fp, Option<Q2> fq, Option<R2> fr, Option<S2> fs, T fun(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n, O o, P p, Q q, R r, S s)) Option<T>
map2<A, A2 extends A, B, B2 extends B, C>(Option<A2> fa, Option<B2> fb, C fun(A a, B b)) Option<C>
map20<A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E, E2 extends E, F, F2 extends F, G, G2 extends G, H, H2 extends H, I, I2 extends I, J, J2 extends J, K, K2 extends K, L, L2 extends L, M, M2 extends M, N, N2 extends N, O, O2 extends O, P, P2 extends P, Q, Q2 extends Q, R, R2 extends R, S, S2 extends S, T, T2 extends T, U>(Option<A2> fa, Option<B2> fb, Option<C2> fc, Option<D2> fd, Option<E2> fe, Option<F2> ff, Option<G2> fg, Option<H2> fh, Option<I2> fi, Option<J2> fj, Option<K2> fk, Option<L2> fl, Option<M2> fm, Option<N2> fn, Option<O2> fo, Option<P2> fp, Option<Q2> fq, Option<R2> fr, Option<S2> fs, Option<T2> ft, U fun(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n, O o, P p, Q q, R r, S s, T t)) Option<U>
map3<A, A2 extends A, B, B2 extends B, C, C2 extends C, D>(Option<A2> fa, Option<B2> fb, Option<C2> fc, D fun(A a, B b, C c)) Option<D>
map4<A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E>(Option<A2> fa, Option<B2> fb, Option<C2> fc, Option<D2> fd, E fun(A a, B b, C c, D d)) Option<E>
map5<A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E, E2 extends E, F>(Option<A2> fa, Option<B2> fb, Option<C2> fc, Option<D2> fd, Option<E2> fe, F fun(A a, B b, C c, D d, E e)) Option<F>
map6<A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E, E2 extends E, F, F2 extends F, G>(Option<A2> fa, Option<B2> fb, Option<C2> fc, Option<D2> fd, Option<E2> fe, Option<F2> ff, G fun(A a, B b, C c, D d, E e, F f)) Option<G>
map7<A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E, E2 extends E, F, F2 extends F, G, G2 extends G, H>(Option<A2> fa, Option<B2> fb, Option<C2> fc, Option<D2> fd, Option<E2> fe, Option<F2> ff, Option<G2> fg, H fun(A a, B b, C c, D d, E e, F f, G g)) Option<H>
map8<A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E, E2 extends E, F, F2 extends F, G, G2 extends G, H, H2 extends H, I>(Option<A2> fa, Option<B2> fb, Option<C2> fc, Option<D2> fd, Option<E2> fe, Option<F2> ff, Option<G2> fg, Option<H2> fh, I fun(A a, B b, C c, D d, E e, F f, G g, H h)) Option<I>
map9<A, A2 extends A, B, B2 extends B, C, C2 extends C, D, D2 extends D, E, E2 extends E, F, F2 extends F, G, G2 extends G, H, H2 extends H, I, I2 extends I, J>(Option<A2> fa, Option<B2> fb, Option<C2> fc, Option<D2> fd, Option<E2> fe, Option<F2> ff, Option<G2> fg, Option<H2> fh, Option<I2> fi, J fun(A a, B b, C c, D d, E e, F f, G g, H h, I i)) Option<J>
mapM2<A, A2 extends A, B, B2 extends B, C>(Option<A2> fa, Option<B2> fb, Option<C> f(A a, B b)) Option<C>
sequenceFree<F, A>(Option<Free<F, A>> ofa) Free<F, Option<A>>
sequenceFuture<A>(Option<Future<A>> ofa) Future<Option<A>>
sequenceIList<A>(Option<IList<A>> ola) IList<Option<A>>
sequenceIVector<A>(Option<IVector<A>> ova) IVector<Option<A>>
sequenceState<S, A>(Option<State<S, A>> osa) State<S, Option<A>>
sequenceTask<A>(Option<Task<A>> ofa) Task<Option<A>>
unless<A>(bool test, A value) Option<A>
when<A>(bool test, A value) Option<A>