None<A> class

Inheritance

Constructors

None()

Properties

hashCode int
The hash code for this object.
no setteroverride
isDefined bool
True if Some of A else false
no setterinherited
isEmpty bool
True if None else false
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

contains(A candidate) bool
Return true if this Option is a Some and value inside equal candidate
inherited
exists(bool predicate(A a)) bool
Return true if this option is nonempty and the predicate returns true Otherwise return false
inherited
filter(bool predicate(A a)) Option<A>
Return current Option if it's nonempty and predicate application return true. Otherwise return None
inherited
flatMap<Z>(Option<Z> f(A a)) Option<Z>
Return Application of f on a inside Some if isDefined else None
inherited
fold<Z>(Z onNone(), Z onSome(A a)) → Z
Applies onNone if this is a None or onSome if this is a Some of A
override
getOrElse(A? caseElse()) → A?
Return a inside Some else supplied caseElse if None
inherited
map<Z>(Z f(A a)) Option<Z>
Return Some of Application of f on a inside Some if isDefined else None
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
orElse<B>(Option<B> caseElse()) Option
Return inchanged Option if Some else supplied caseElse if None
inherited
toEither<L>(L leftValue) Either<L, A>
Consider that None is a Left and Some is a Right(a)
inherited
toLeft(A caseNone) Either<A, A>
Return Left from Option
inherited
toRight(A caseNone) Either<A, A>
Return Right from Option
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object that) bool
The equality operator.
override