Some<T> class

Means "has value"

Available extensions

Constructors

Some(T value)
const

Properties

has bool

Available on Maybe<T>?, provided by the MaybeImpl extension

Get the Value if it has
no setter
hashCode int
The hash code for this object.
no setteroverride
isNone bool

Available on Maybe<T>?, provided by the MaybeImpl extension

Returns true if the this is a None value
no setter
isSome bool

Available on Maybe<T>?, provided by the MaybeImpl extension

Returns true if the this is a Some value
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
v → T
no setter
val → T?

Available on Maybe<T>?, provided by the MaybeImpl extension

no setter
value → T
final

Methods

and<U>(Maybe<U>? other) Maybe<U>?

Available on Maybe<T>?, provided by the MaybeImpl extension

Returns None if the this is None, otherwise returns other
andThen<U>(Maybe<U>? f(T val)) Maybe<U>?

Available on Maybe<T>?, provided by the MaybeImpl extension

Returns None if the this is None, otherwise calls f with the wrapped value and returns the result
defaultVal(T v) Maybe<T>?

Available on Maybe<T>?, provided by the MaybeImpl extension

Set a default value when it is None(null)
defaultValFn(T fn()) Maybe<T>?

Available on Maybe<T>?, provided by the MaybeImpl extension

Set a default value when it is None(null)
flatMap<U>(Maybe<U>? f(T val)) Maybe<U>?

Available on Maybe<T>?, provided by the MaybeImpl extension

Returns None if the this is None, otherwise calls f with the wrapped value and returns the result
flatten() Maybe<T>?

Available on Maybe<Maybe<T>?>?, provided by the FlattenMaybeImpl extension

Converts from Maybe<Maybe<T>> to Maybe<T>
map<U>(U f(T val)) Maybe<U>?

Available on Maybe<T>?, provided by the MaybeImpl extension

Maps an Maybe
none<R>(R none()) Maybe<R>?

Available on Maybe<T>?, provided by the MaybeImpl extension

When it not has Value Return Some(none(it))
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
or(Maybe<T>? other) Maybe<T>?

Available on Maybe<T>?, provided by the MaybeImpl extension

Returns this if this contains a value, otherwise returns other
orElse(Maybe<T>? f()) Maybe<T>?

Available on Maybe<T>?, provided by the MaybeImpl extension

Returns this if this contains a value, otherwise calls f and returns the result
some<R>(R some(T val)) Maybe<R>?

Available on Maybe<T>?, provided by the MaybeImpl extension

fMap
then<U>(U f(T val)) Maybe<U>?

Available on Maybe<T>?, provided by the MaybeImpl extension

Maps an Maybe
toString() String
A string representation of this object.
inherited
when<R>({R some(T val)?, R none()?}) Maybe<R>?

Available on Maybe<T>?, provided by the MaybeImpl extension

Pattern matching
xor(Maybe<T>? other) Maybe<T>?

Available on Maybe<T>?, provided by the MaybeImpl extension

Returns Some if exactly one of this, other is Some, otherwise returns None

Operators

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